Are abstract methods and pure virtual functions the same thing?

前端 未结 5 1083
佛祖请我去吃肉
佛祖请我去吃肉 2020-12-24 05:05

As far as I know, both abstract methods and pure virtual functions do NOT provide any functionality ... So can we say they\'re both the same thing ?

Also, suppose a

5条回答
  •  无人及你
    2020-12-24 05:38

    I would say yes, abstract methods and pure virtual functions are conceptually the same thing.

    Also, suppose a class (not necessarily declared as abstract) contains a number of implemented methods (not abstract or virtual), but contains a pure virtual function. Is this class then abstract ?

    A class with at least 1 pure virtual function is called an abstract class.

提交回复
热议问题