#include class BaseClass { public: int DataValue; BaseClass(int a) { DataValue=a; } ~BaseClass(){} }; class DerivedClass1 : public BaseClass {public: DerivedClass1(int xx):BaseClass(xx){} }; class DerivedClass2 : public BaseClass { public: DerivedClass2 (int yy):BaseClass(yy){} }; class MultipeClass1: public DerivedClass1, public DerivedClass2 { public: MultipeClass1(int x,int y):DerivedClass1(x), DerivedClass2 (y){cout<};
void main( ) { MultipeClass1 A(100,200); cout<cout< } class DerivedClass3 : virtual public BaseClass { public: int a; DerivedClass3(int xx):BaseClass(xx){a=xx;} }; class DerivedClass4 : virtual public BaseClass { public: DerivedClass4 (int yy):BaseClass(yy){} }; class MultipleClass2: virtual public DerivedClass3,virtual public DerivedClass4 { public: MultipleClass2( int x,int y):DerivedClass3(x),DerivedClass4 (y){cout<<""<}; void main3( ){ MultipleClass2 A(100,200); cout< cout< }