Answers to Self-Review Exercises
-
class
..h
.type, name.
data member.
access specifier.
void
.getline
.#include
.
-
False. Function names begin with a lowercase letter and all subsequent words in the name begin with a capital letter.
True.
True.
False. Such variables are local variables and can be used only in the member function in which they’re declared.
True.
True.
3.3 A local variable is declared in the body of a function and can be used only from its declaration to the closing brace of the block in which it’s declared. A data member is declared in a class, but not in the body of any of the class’s member functions. Every object of a class has each of the class’s data members. Data members are accessible to all member functions ...
Get C++ How to Program, 10/e now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.