Skip to content

Latest commit

 

History

History
21 lines (14 loc) · 822 Bytes

naming.md

File metadata and controls

21 lines (14 loc) · 822 Bytes

Keywords

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.

Identifiers

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 and myvar 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.

Naming Convention

In C++ we use CamelCase for all names. Eg myVariable