Records rather than Memories

[C++] 키워드(keyword)와 식별자(naming identifiers) 본문

Software/C

[C++] 키워드(keyword)와 식별자(naming identifiers)

Downer 2019. 12. 29. 16:29

키워드(keyword)

__abstract 2

__alignof 연산자 4

__asm 4

__assume 4

__based 4

__box 2

__cdecl 4

__declspec 4

__delegate 2

__event

__except 4

__fastcall 4

__finally 4

__forceinline 4

__gc 2

__hook 3

__identifier

__if_exists

__if_not_exists

__inline 4

__int16 4

__int32 4

__int64 4

__int8 4

__interface

__leave 4

__m128

__m128d

__m128i

__m64

__multiple_inheritance 4

__nogc 2

__noop

__pin 2

__property 2

__ptr32 4

__ptr644

__raise

__restrict 4

__sealed 2

__single_inheritance4

__sptr4

__stdcall 4

__super

__thiscall

__try_cast 2

__unaligned 4

__unhook 3

__uptr 4

__uuidof 4

__value 2

__vectorcall 4

__virtual_inheritance 4

__w64 4

__wchar_t

추상(C++/CLI)

alignas

배열(C++/CLI)

auto

bool

break

case

catch

char

char16_t

char32_t

class

const

const_cast

constexpr

continue

decltype

default

대리자(C++/CLI)

delete

deprecated 1

dllexport 1

dllimport 1

do

double

dynamic_cast

else

enum

Enum 클래스

enum 구조체

이벤트(C++/CLI)

explicit

extern

false

finally

float

for

에서는 for each

friend

friend_as

gcnew(C++/CLI)

제네릭(C++/CLI)

goto

if

initonly

inline

int

인터페이스 클래스(C++/CLI)

인터페이스 구조체(C++/CLI)

interior_ptr(C++/CLI)

리터럴(C++/CLI)

long

mutable

naked 1

namespace

(C++/CLI)

new

noexcept

noinline 1

noreturn 1

nothrow 1

novtable 1

nullptr

operator

private

속성(C++/CLI)

property 1

protected

public

ref 클래스

ref 구조체

register

reinterpret_cast

return

safecast

봉인(C++/CLI)

selectany 1

short

signed

sizeof

static

static_assert

static_cast

struct

switch

template

this

thread 1

throw

true

try

typedef

typeid

typeid

typename

union

unsigned

사용 하 여 선언

사용 하 여 지시문

uuid 1

값 클래스(C++/CLI)

값 구조체(C++/CLI)

virtual

void

volatile

while

C++ 내에서 해당 단어들은 특별한 의미를 지니며 기능을 가지고 변수명, 함수명 등으로 사용할 수 없고 IDE에서도 구분되는 색으로 표시함으로써 혼란을 방지한다.

 

 

 

식별자(identifier)

변수, 함수, 타입, 객체 등의 이름을 말한다. 

- 당연하지만 키워드는 식별자로 사용할 수 없다.

- 특수문자와 공백을 포함할 수 없다.

- 숫자로 시작할 수 없다.

- 대소문자를 구분한다.

 

 

 

키워드 (C++)

키워드 (C++)Keywords (C++) 이 문서의 내용 --> 키워드는 특별한 의미가 있는 미리 정의된 예약된 식별자입니다.Keywords are predefined reserved identifiers that have special meanings. 따라서 프로그램에서 키워드를 식별자로 사용할 수 없습니다.They cannot be used as identifiers in your program. 다음 키워드는 Microsoft C++에서 예약되었

docs.microsoft.com

 

'Software > C' 카테고리의 다른 글

[C++] cout, cin, endl  (0) 2019.12.28
[C++] 변수의 초기화와 할당  (0) 2019.12.28
네트워크 플로우(Network flow  (0) 2019.12.22
위상 정렬(Topology Sort)  (0) 2019.12.13
플로이드 와샬(Floyd Warshal) 알고리즘  (0) 2019.12.11
Comments