title: How to define a base class?
body: <p>I am getting a an error called C2504: 'MyCourse' : base class undefined</p>
  
  <p>I have 3 classes, but all of them need to share some information with each other :</p>
  
  <pre><code> #include "stdafx.h"
  #include &lt;windows.h&gt;
  #include &lt;iostream&gt;
  #include &lt;vector&gt;
  #include &lt;string&gt;
  using namespace std;
  
  class MyStudent : public MyCourse {
     public :
       vector&lt;double&gt; assignScores;
       vector&lt;double&gt; testScores;
       string getName();
       string getAssignName();
       string getTestName();
       int getAssignScale();
       int getTestScale();
       void calcAssignPercentage();
       void calcTestPercentage();
       void addAssignScore(double sc);
       void addTestScore(double sc);
       void toStringDisplay();
  };
  
  class MyCourse : public MyStudent {
  public:
      string courseName;
      vector &lt;MyStudent&gt; allStudents;
      void addStudent();
      void toStringDisplay();
      void addAssignAll();
      void addTestAll();
  };
  
  
  
  class MyDriver1 : public MyCourse, public MyStudent
  {
  public :
      void student();
      void assignment();
      void test();
      void show();
      void help();
      void quit();
  };
  </code></pre>
  
  <p>How can I have a base class when each of them extends to another ?</p>