9.4 Identifiers
Many things have a name: variables, constants, functions, classes, macros, and many more. These names consist of letters, digits, and the underscore character _. By letters, we mean A to Z and a to z; you should not use umlauts and other international characters, although some compilers support them.
An identifier must not start with a digit—so you cannot use 9eye, for example.
Regarding the underscore, you should not start anything with two underscores __ and should avoid an underscore followed by an uppercase letter at the beginning, as these forms are reserved for the standard library internally: __number and _Text can cause problems, for example.
Here are a few valid identifiers—all of which are different, as C++ is case-sensitive: ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access