title: How do I call and use a copy constructor in abstract classes?
body: <p>I have an assignment that demands I use a copy constructor. So let's say we have the following code:</p>
  
  <pre><code>class Animal   /*abstract class*/
  {
  private:
      string name;
      int age;
  public:
      Animal();
      ~Animal();
      virtual int is_bad() = 0;
  }
  
  class Dog : public Animal
  {
  public:
      Dog();
      ~Dog();
      int is_bad() {
          return 0;
      }
  }
  
  /*constructors*/
  
  Animal::Animal(int age,string name)
  {
      this-&gt;age=age;
      this-&gt;name=name;
  }
  
  Dog::Dog(int age, string name) : Animal(age,name)
  {
      cout &lt;&lt; "Woof" &lt;&lt; endl;
  }
  
  /*main*/
  
  int main()
  {
      Animal * c;
  
      c = new Dog(10,"rex");
  
      return 0;
  }
  </code></pre>
  
  <p>So my question is as follows. If I want to make a copy constructor that makes a duplicate of dog for example <code>Dog(const Dog &amp; d)</code>, what do I need to add to my code and how do I call it in my main function?
  I'm a newbie so I'll need a quite elaborated answer.</p>