标签:
#include <iostream> using namespace std; class BaseA { public: void say() { cout << "hello world" << endl; } }; class BaseB { public: void eat() { cout << " eating watermelon" << endl; } }; class Human : public BaseA, public BaseB { public: void dance(){ cout << " dancing " << endl; } }; int main(){ Human man; man.eat(); man.say(); man.dance(); return 0; }
标签:
原文地址:http://www.cnblogs.com/i80386/p/4587065.html