11.07.2015 Views

tYSR20

tYSR20

tYSR20

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Chapter 26: Inheriting Multiple Inheritance 347#include #include using namespace std;// Furniture - more fundamental concept; this class// has “weight” as a propertyclass Furniture{public:Furniture(int w = 0) : weight(w) {}int weight;};class Bed : virtual public Furniture{public:Bed() {}void sleep(){ cout

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!