Why do we need abstract classes in C++?

前端 未结 10 2111
暗喜
暗喜 2020-12-14 03:19

I\'ve just learned about polymorphism in my OOP Class and I\'m having a hard time understanding how abstract base classes are useful.

What is the purpose of an abstr

10条回答
  •  旧时难觅i
    2020-12-14 03:41

    Abstract classes are used to define an interface to be implemented. See some references:

    http://en.wikibooks.org/wiki/C%2B%2B_Programming/Classes/Abstract_Classes

提交回复
热议问题