virtual inheritance

Greetings People!
Is there any difference or meaning in the code below?

1
2
3
4
5
6
7
8
9
10
class A{
public:
	void Foo() { cout << " Foo() from A\n "; }
};
class B : virtual public A{
};
class C : virtual public A{
};
class D : public B, public C{
};


1
2
3
4
5
6
7
8
9
10
class A{
public:
	void Foo() { cout << " Foo() from A\n "; }
};
class B : public virtual A{
};
class C : public virtual A{
};
class D : public B, public C{
};
Is there any [semantic] difference

No.
Last edited on
Topic archived. No new replies allowed.