From Microsoft Docs:
To declare a constant member function, place the
constkeyword after
the closing parenthesis of the argument list.
So it should be:
virtual void print() const = 0;
From Microsoft Docs:
To declare a constant member function, place the
constkeyword after
the closing parenthesis of the argument list.
So it should be:
virtual void print() const = 0;