Introduction to OOP | Chapter 12: Implications of substitution: | next | previous | audio | real | text |
class Window { public: virtual void oops(); private: int height; int width; }; class TextWindow : public Window { public: virtual void oops(); private: char * contents; int cursorLocation; }; | Window x; // how much space to set aside? TextWindow y; x = y; // what should happen here? |