What is the point of a private pure virtual function?

后端 未结 6 837
后悔当初
后悔当初 2020-11-27 09:03

I came across the following code in a header file:

class Engine
{
public:
    void SetState( int var, bool val );
    {   SetStateBool( int var, bool val );          


        
6条回答
  •  自闭症患者
    2020-11-27 09:41

    Well, for one, this would allow a derived class to implement a function that the base class (containing the pure virtual function declaration) can call.

提交回复
热议问题