C++ keywords and identifiers
A C++ keyword (also called a reserved word) is a word that means something to the compiler. The
keywords used in the example application are using, namespace, and return. You’re not allowed to use
these keywords as variable or function names; the compiler will report an error if you do. You’ll find
that Visual Studio helps you identify keywords by displaying them in a special color.
An identifier is any name that the programmer uses to represent variables and functions. An identi-
fier must start with a letter and must contain only letters, numbers, or underscores. The following are
legal C++ identifiers:
■
■
My_variable
■
■
AReallyLongName
The following are not legal C++ identifiers:
Do'stlaringiz bilan baham: |