虛基類釋義

2021-04-14 09:20:16 字數 489 閱讀 3298

#include "stdafx.h"

#include

#include

using namespace std;

class person

};class teacher:virtual public person

};class student:virtual public person

};class graduate:public teacher,public student

void show()

};

int main()

輸出結果:

虛基類釋義

include stdafx.h include include using namespace std class person class teacher virtual public person class student virtual public person class gradua...

虛基類釋義

include stdafx.h include include using namespace std class person class teacher virtual public person class student virtual public person class gradua...

虛基類釋義

include stdafx.h include include using namespace std class person class teacher virtual public person class student virtual public person class gradua...