虛基類釋義

2021-04-14 10:17:15 字數 489 閱讀 9056

#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...