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
If you are searching for a standard operator+() implementation, then unfortunately that is impossible:
class X { public: virtual X operator+(X const &rhs) = 0; };
This code cannot compile, because the compiler cannot return an abstract X class by value.