[SOLVED] CS #include

$25

File Name: CS_#include.zip
File Size: 103.62 KB

5/5 - (1 vote)

#include
using namespace std;

class A1 {
int i;
public:
A1() { cout << “in A1::A1()
“; };A1(int k) : i(k){ cout << “in A1::A1(int)
“; }}; class A : virtual public A1 {public:A() {cout<<“in A::A()
“;};A(int k) : A1(k){ cout << “in A::A(int)
“;}};class B : public A {public:B(){cout<<“in B::B()
“;};B(int i) : A(i) { cout << “in B::B(int)
“; }};class C : public A {public:C(){ cout << “in C::C()
“; };C(int i) : A(i) { cout << “in C::C(int)
“; }};class D : public B, C{public:D() { cout << “in D::D()
“; }D(int i) : A1(i), B(i), C(i) { cout << “in D::D(int)
“; }};int main(){D d1(2);D d2;int i; cin >> i;
return 0;
}

Reviews

There are no reviews yet.

Only logged in customers who have purchased this product may leave a review.

Shopping Cart
[SOLVED] CS #include
$25