MCPcopy Create free account
hub / github.com/EricPengShuai/Interview / D

Class D

base_code/virtual_public.cpp:33–41  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

31};
32
33class D: public B, public C
34{
35public:
36 // B C 虚继承 A 之后,ma 必须交给 D 初始化,所以这里必须调用 A(data)
37 D(int data) : A(data), B(data), C(data) { cout << "D()" << endl; }
38 ~D() { cout << "~D()" << endl; }
39protected:
40 int md;
41};
42
43int main()
44{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected