P
pembed2003
Hi all,
I recently saw a piece of code that looks like:
class one{public: one(){} };
class two : public virtual one{public: two(){} };
class three : virtual public one{public: three(){} };
My questions:
1. What does it mean to have a virtual inheritenec? When do you want
that? What affect does it have on class two and three?
2. It seems like you can say "public virtual" or "virtual public".
Does order matter?
Thanks!
I recently saw a piece of code that looks like:
class one{public: one(){} };
class two : public virtual one{public: two(){} };
class three : virtual public one{public: three(){} };
My questions:
1. What does it mean to have a virtual inheritenec? When do you want
that? What affect does it have on class two and three?
2. It seems like you can say "public virtual" or "virtual public".
Does order matter?
Thanks!