C++ Keywords are predefined phrases that have a meaning and perform specific tasks. These are some reserved words which have specific meanings and are known to compiler. These keywords can not be used as variables. The details of the C++ keywords are given in the list below.
asm | auto | bool | break | case |
catch | char | class | const | const_cast |
continue | default | delete | do | double |
dynamic_cast | else | enum | explicit | export |
extern | false | float | for | friend |
goto | if | inline | int | long |
mutable | namespace | new | operator | private |
protected | public | register | reinterpret_cast | return |
short | signed | sizeof | static | static_cast |
struct | switch | template | this | throw |
true | try | typedef | typeid | typename |
union | unsigned | using | virtual | void |
volatile | wchar_t | while |
These keywords include data types and built in functions. Remember that variable should not have a name same as a keyword. In this case compiler raises an error. For example, in the below code , int is a keyword that defines a variable var of data type int.
Comments are closed.