This is a list of reserved keywords in C++. Since they are used by the language, these keywords are not available for re-definition or overloading.
Eg. if, else, while, for, do, enum, new, void, int, auto, bool etc.
Within a program names are used to designate variables and functions. The following rules apply when creating names, which are also known as identifiers:
- Names can contain letters, digits and underscores.
- Names must begin with a letter or an underscore (_).
- Names are case sensitive (
myVar
andmyvar
are different variables). - Names cannot contain whitespaces or special characters like !, #, %, etc.
- Reserved words (like C++ keywords, such as
int
) cannot be used as names.
In C++ we use CamelCase for all names. Eg myVariable