write the syntax of constructor for virtual base clas in c++
Answers
Answered by
6
Answer:
Syntax 1: class B : virtual public A { };
Syntax 2: class C : public virtual A { }; Note: virtual can be written before or after the public. Now only one copy of data/function member will be copied to class C and class B and class A becomes the virtual base class.
Similar questions