Based on http://en.wikipedia.org/wiki/Virtual_inheritance
class Animal
{
...
};
// Two classes virtually inheriting Animal:
class Mammal : public virtual Animal
{
...
};
I also saw books use the following syntax,
class Mammal : virtual public Animal
{
...
};
Question> Which is one the C++ standard?
Thank you
Both are standard. Use whichever the local coding conventions require.
From ISO/IEC 14882:2003(E) - 10.1
A list of base classes can be specified in a class definition using the notation:
Notice that either is recommended.