What does it mean when “virtual” is in “class Foo : public virtual Bar” as opposed to “virtual void frob()”?

后端 未结 1 536
别那么骄傲
别那么骄傲 2021-02-15 11:06

What does it mean when \"virtual\" is in \"class Foo : public virtual Bar\" as opposed to \"virtual void frob()\"?

For a given method there are 8 cases stemming from the

相关标签:
1条回答
  • 2021-02-15 11:38

    That's virtual inheritance, you do it when you know you'll be doing multiple inheritance. That page goes into way more detail.

    0 讨论(0)
提交回复
热议问题