title: c++ polymorphism of operator overloading
body: <p>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+() function 
  compiler say that derive class cannot make . because following class is abstract
  I know that I cannot create object of abstract classes but now I try to make derive class object.</p>
  
  <p>Here is the code</p>
  
  <pre><code>#include &lt;iostream&gt;
  using namespace std;
  class ana {
      protected :
      int x;
  
      public :
      virtual int operator+()=0;
      virtual void operator=(ana&amp;)=0;
      };
  
  class baba : public ana{
      public:
      baba(int k){x=k;}
      int   operator+(baba &amp;ali){
          int k;
          k=x+ali.x;
          return k;
      }
     void operator=(baba &amp;ali){
         x=ali.x;
         }
  
  
      };
  
  int main(){
      baba k(4);
  
      return 0;
      }
  </code></pre>