Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- class Human {
- public:
- int age;
- int rost;
- void information() {
- std::cout << "я человек";
- };
- };
- class Pianist {
- public:
- void penie() {
- std::cout << "Я пою ля-ля-ля";
- };
- };
- class Doctor: public Human, public Pianist {
- public: void say() {
- std::cout << "Я лечу" << age;
- };
- void information() {
- std::cout << "я доктор а не человек";
- }
- };
- int main ()
- {
- Doctor a;
- a.age = 30;
- a.say();
- a.penie();
- a.information();
- return 0;
- }
Add Comment
Please, Sign In to add comment