//am.cpp //inheritance, constructor, access control, frield.. //am.cpp #include "iostream" using namespace std; class Animal { long height; // friend int main( int argc, char* gg[ ]) ; public: void setWet(double x) { wet = x; } double cry( ) { return height; } char gg, yy; short haha; protected: double wet; public: Animal(int x) { height = x; cout << "won won\n"; } Animal( ) { cout << " One animal! " << endl; } }; class Mankind :public Animal { short abc; public: Mankind( ) { cout << " a man !! \n"; } Mankind(int x) :Animal(x*10){ cout << " kikiki\n"; } //double showHt( ) { return height; } }; int main( int argc, char* gg[ ]) { Animal x; cout << " x has " << sizeof(x) << "bytes\n"; x.setWet (38); for(int i=0; i < argc; ++i) cout << i << ": " << gg[i] << endl; Mankind y(49); y.gg=7; cout << " y has " << sizeof ( y )<< " bytes\n"; cout << "==y.ht=" << y.cry ( ) << endl; }