Keywords

C++ has 63 keywords for its own internal use, which CANNOT be used for any other purpose:

 

asm insert an assembly instruction
auto declare a local variable
bool declare a boolean variable
break break out of a loop
case part of switch statment
catch handles thrown exceptions
char declare a character variable
class declare a class
const declare immutable data
const_cast cast from const variables
continue bypass iterations of a loop
default default handler in a case statement
delete free memory
do loop
double declare a double precision floating point variable
dynamic_cast perform runtime casts
else alternate case for an if statement
enum create enumerated types
explicit only use constructors when they exactly match
export
extern tell the compiler about variables defined elsewhere
FALSE Boolen value false
float declare a floating point variable
for loop
friend grant non-member function access to private data
goto jump to a different part of the program
if execute code based on the result of a test
inline expand a call to a function rather than calling that function
int declare an integer variable
long delcare a long integer variable
mutable override a const variable
namespace partition the global namespace by defining a scope
new allocate dynamic memory for a new variable
operator create overloaded operator functions
private declare private members of a class
protected declare protected members of a class
public declare public members of a classa
register request that variable be optimised for speed
reinterpret_cast change the type of a variable
return return from a function
short declare a short integer variable
signed modify variable type declarations
sizeof return the size (in Bytes) of a variable or type
static create permanent storage for a variable
static_cast perform a nonpolymorphic cast
struct create a new structure
switch execute code based on the different possible values for a variable
template create generic functions
this a pointer to the current object
throw throws an exception
TRUE Boolean value true
try execute code that can throw an exception
typedef create a new type name from an existing type
typeid describes an object
typename declares a class or undefined type
union a structure that assigns multiple variables to the same memory location
unsigned declare an unsigned integer variable
using used to import a namespace
virtual create a function that can be overridden by a derived class
void declare functions or data with no associated data type
volatile warn the compiler about variables that can be modified unexpectedly
wchar_t declare a wide character variable
while loop

source

Leave a Reply