How can I make pure virtual function a operator+(); function. wheh ı do like this in base class int operator+()=0; compiler gives error . in derive class operator+() funct
Note : Question have been updated, making this answer less valid.
If you're description is correct, you're just forgetting to use the virtual
keyword to specify the operator as virtual...
class Addable{
public:
virtual int operator+ const ( const Addable& other ) = 0; // pure virtual
virtual int operator+ const ( int number ) = 0; // pure virtual
};