Introduction to OOP: Chapter 12: Implications of Inheritance [next] [previous] [audio] [real] [text]

Specific Example of Problem

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;
TextWindow y;
x = y;
Intro OOP, Chapter 12, Slide 4