C++多继承
C++多继承
C++多继承reference
C++多继承
#include
using namespace std;
class A
{
public:
void setx(int a){x = a;}
int getx(){return x;}
private:
int x;
};
class B
{
public:
void setx(int a){x = a;}
int getx(){return x;}
private:
int x;
};
class C: public A, public B
{
public:
void setx(int a){x = a;}
int getx(){return x;}
private:
int x;
};
int main()
{
C te
C++多继承最先出现在Python成神之路。
共有 0 条评论