+ 1

On classes

How to learn different types of classes?

12th Jan 2017, 5:28 AM
Sanket Kulkarni
Sanket Kulkarni - avatar
1 Answer
+ 3
what do you mean? write some to represent various real life objects I guess.. creature->rat class creature { public: int setHealth(int health) { m_health = health;} virtual void speak() { cout << "Creature";} private: int m_health; } class rat::public creature { public: void speak() { cout << "Rat!";} }
12th Jan 2017, 6:09 AM
jay
jay - avatar