MFC Programmer's SourceBook : Thinking in C++
Bruce Eckel's Thinking in C++, 2nd Ed Contents | Prev | Next

answers:

  1. 1. What happens when you define an object?
  2. 2. Why is it important in C++ that an object be defined anywhere within a scope, and not just at the beginning?
  3. 3. At what point does the compiler allocate storage for the objects in a block? Describe how you would write a program to prove this.
  4. 4. What does the compiler do if it can't find a constructor which matches one that you've given it?
  5. 5. Does the compiler always call a constructor for an object?
  6. 6. Since constructors are so important, are they created automatically? Do they do anything extra which you haven't told them to do?

    From this chapter, the answer to both questions would be “no.” But it turns out that special types of constructors may be created for you automatically, and certain activities are secretly installed in the constructor. But those are special behaviors, and their understanding must wait until a future chapter.

add #endif // FILE_H

Contents | Prev | Next


Go to CodeGuru.com
Contact: webmaster@codeguru.com
© Copyright 1997-1999 CodeGuru