[SOLVED] CS #include

$25

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

5/5 - (1 vote)

#include
using namespace std;

class V {
int i;
public:
V() { cout << “in V::V()
“; };V(int i) : i(i){ cout << “in V::V(int)
“; }};class A : virtual public V {public:A() { cout << “in A::A()
“; };A(int i) : V(i) { cout << “in A::A(int)
“; }};class B : virtual public V {public:B(){ cout << “in B::B()
“; };B(int i) : V(i) { cout << “in B::B(int)
“; }};class C : public A, B {public:C(){ cout << “in C::C()
“; };C(int i) : A(i), B(i) { cout << “in C::C(int)
“; }};class D : virtual public V {public:D() { cout << “in D::D()
“; }D(int i) : V(i) { cout << “in D::D(int)
“; }};class E : public C, D {public:E() { cout << “in E::E()
“; }E(int i) : V(i), C(i), D(i) { cout << “in E::E(int)
“; }};int main(){E e1(2);E e2;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