Keywords


Keywords are considered to be reserved. Following are the keywords of C++.

asm auto break case catch char class const continue default delete do double else enum extern float for friend goto if inline int long new operator private protected public register return short signed sizeof static structure switch typedef template this throw try union unsigned virtual void volatile while

Compilers whose input is expected in ASCII format use the following characters for punctuation or to represent operators.

!  %  ^  &  *  (  )  -  +  =  {  }  |  ~
[  ]  /  ;  '  :  "  <  >  ?  ,  .  /

The following multiple character combinations are used for operators. Each combination forms a single token.

++ -- -> .* ->* << >> <= >= || *= /= %= += -= <<= >>= &= ^= |= ::.

The preprocessor makes use of the tokens # and ##.

Identifiers with the first two characters being the underscore character '_' are often used by compiler implementations for a specific purpose; therefore, it is unwise to name identifiers such that they begin with a double underscore.