///////////////////////////////////////////////////////////////////////// // Rclient.cpp - demonstrate how class structures become rigid // // // // Jim Fawcett, CSE775 - Distributed Objects, Summer 2010 // ///////////////////////////////////////////////////////////////////////// // Note: // - TopLevel.h must include LowerLevel.h since it holds an instance // of class LowerLevel defined in that header. // - Consequently, this client will include the text of both headers // simply to use TopLevel. // - So client is bound to both TopLevel and LowerLevel even though it // only wants to use TopLevel #include "TopLevel.h" #include struct cosmetic { ~cosmetic() { std::cout << "\n\n"; } } cosmetic_; void main() { std::cout << "\n Demonstrating rigid class structure"; std::cout << "\n =====================================\n"; TopLevel tl; tl.say(); }