Virtual Inheritance Confusion
- by alan
I'm reading about inheritance and I have a major issue that I haven't been able to solve for hours:
Given a class Bar is a class with virtual functions,
class Bar
{
virtual void Cook();
}
What is the different between:
class Foo : public Bar
{
virtual void Cook();
}
and
class Foo : public virtual Bar
{
virtual void Cook();
}
…