Note 2.3.1.
In C++, integer variables are declared as type
int
and character variables are declared as type char
.
int
and character variables are declared as type char
.
char
.
char fred;
char
variable can contain characters, and it should come as no surprise that int
variables can store integers.
string
values, but we are going to skip that for now (see Chapter 7).
int bob;
char firstLetter;
char lastLetter;
int hour, minute;
int
type).
name
, firstInitial
, and numberOfSiblings
IN THAT ORDER. It is up to you to choose the correct types for these variables.