title: Cannot initiate an abstract class because members are abstract
body: <p>I am new to polymorphism, this is a similar question to <a href="https://stackoverflow.com/questions/10532366/cannot-instantiate-abstract-class-because-members-are-abstract">this</a> but the solution didn't help me. 
  The exact error is:</p>
  
  <blockquote>
    <p>Circle.cpp(34) : error C2259: 'Circle' : cannot instantiate abstract class
            due to following members:
           'void Shape::particle(const Ray &amp;,const int&amp;)' : is abstract</p>
  </blockquote>
  
  <p>I have tried to read up on this and what I think is  that the clone() member function,calls Circle's copy constructor to copy the state of this into the newly created Circle object and tries to initialize the 'particle' (which it cant do).
  If I am right: how do I correct this?
  If I am wrong...what is it doing (what am I doing wrong) and how do i correct it. </p>
  
  <pre><code>class Shape {
  public:
  
  virtual void particle(const Ray&amp; ray, const int&amp; count) = 0;      
  ...
  virtual Shape* clone()  const = 0;   
  private:
  vector&lt;Ray&gt;  incoming_ray; 
  vector&lt;int&gt;  counts;
  };
  
  class Circle : public Shape {
  public:
  Circle* clone()  const;   //covariant return type
  virtual void
  particle(const Ray&amp; ray, const int&amp; count);
   ...
  };
  </code></pre>
  
  <p>And then </p>
  
  <pre><code>Circle* Circle::clone()  const { return new Circle(*this); }
  
  void
  Circle::particle(const Ray&amp; rays, const int&amp; count){
  incoming_ray.push_back(inc_ray);
  counts.push_back(counts);};
  </code></pre>
  
  <p>I tried </p>
  
  <pre><code>virtual void particle(const Ray&amp; ray, const int&amp; count) const = 0; 
                                                            ^
  </code></pre>
  
  <p>but still got the same error?</p>
  
  <p>Thanks</p>