|
EXERCISES SECTION 2.8
Exercise 2.28: Compile the following program to determine whether your compiler warns about a missing semicolon after a class definition: - class Foo {
-
} int main() { return 0; }
If the diagnostic is confusing, remember the message for future reference.
Exercise 2.29: Distinguish between the public and private sections of a class.
Exercise 2.30: Define the data members of classes to represent the following types:
(a) a phone number (b) an address
(c) an employee or a company (d) a student at a university
|