#include <iostream> using namespace std; class Animal { public: Animal() {} void eat() { cout << "eat\n"; } protected: void play() { cout << "play\n"; } private: void drink() { cout << "drink\n"; } }; class Giraffe: protected Animal { public: Giraffe() {} void StrechNeck() { cout << "Strech neck \n"; } void take() { eat(); // _______________ //drink(); // _______________ //play(); // _______________ } }; int main() { Giraffe gir; //gir.eat(); // _______________ //gir.play(); // _______________ //gir.drink(); // _______________ return 0; }