title: Why is the following code giving me an error about an abstract class?
body: <pre><code>#include &lt;iostream&gt;
  using namespace std;
  
  class Vehicle
  {
  public:
      Vehicle() {};
      virtual ~Vehicle() {};
      virtual void Move() = 0;
      virtual void Haul() = 0;
  };
  
  class Car : public Vehicle
  {
  public:
      Car() {};
      virtual ~Car() {};
      virtual void Move(int m) { cDist = m;
      cout &lt;&lt; "Vehicle moves " &lt;&lt; cDist &lt;&lt; " miles/hour\n"; }
      virtual void Haul() { cout &lt;&lt; "Car's Hauling!\n"; }
  private:
      int cDist;
  };
  
  class Bus : public Car
  {
  public:
      Bus() {};
      virtual ~Bus() {};
      void Move(int m) { Move(m); }
      void Haul() { "Bus is Hauling!\n"; }
  };
  
  int main()
  {
      Vehicle* ptCar = new Car;
      Vehicle* ptBus = new Bus;
      ptCar-&gt;Move(1000);
      system("pause");
      return 0;
  }
  </code></pre>
  
  <p>guys, why this code is giving me errors when trying to instantiate an object of Car, and Bus in main. I didn't intended to create an abstract class of Car and Bus, only of Vehicle...
  any help appreciated</p>
  
  <pre><code>1&gt;------ Build started: Project: OperatorsTypes, Configuration: Debug Win32 ------
  1&gt;  main.cpp
  1&gt;c:\users\jorge\documents\visual studio 2010\projects\shapes\operatorstypes\operatorstypes\main.cpp(36): error C2259: 'Car' : cannot instantiate abstract class
  1&gt;          due to following members:
  1&gt;          'void Vehicle::Move(void)' : is abstract
  1&gt;          c:\users\jorge\documents\visual studio 2010\projects\shapes\operatorstypes\operatorstypes\main.cpp(9) : see declaration of 'Vehicle::Move'
  1&gt;c:\users\jorge\documents\visual studio 2010\projects\shapes\operatorstypes\operatorstypes\main.cpp(37): error C2259: 'Bus' : cannot instantiate abstract class
  1&gt;          due to following members:
  1&gt;          'void Vehicle::Move(void)' : is abstract
  1&gt;          c:\users\jorge\documents\visual studio 2010\projects\shapes\operatorstypes\operatorstypes\main.cpp(9) : see declaration of 'Vehicle::Move'
  ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
  </code></pre>