Next: Arrays
Up: Data Structures
back: Data Structures
-
To use variables within your programs, you must declare
the variable's type and name
-
Variable names must be unique and meaningful
-
Variable names must start with a letter or underscore
-
C++ considers upper and lowercase letters different
A variable's type determines the types of values a variable
can hold; common types include char, int, float,
long
-
Use comments to describe the purpose of variables