title: Compling error Class 'does not name a type' dispite header file being included
body: <p>I am a beginner in the C++ language and have run into a compiling error that has stumped me for days for my latest assignment. 
  The code is using a class GradeBook to set both the name of the course and the instructor's name.</p>
  
  <p>Here is the driver file where I include the header file that contains the class GradeBook</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include "GradeBook.h"
  
  using namespace std;
  
  int main()
  {
  
      gradeBook gradeBook1 ();
      gradeBook gradeBook2 ();
  
      cout &lt;&lt; "Grade Book Initial Course Name: \n" &lt;&lt; gradeBook1.getCourseName() &lt;&lt; endl;
      cout &lt;&lt; "Initial Instructor Name: \n" &lt;&lt; gradeBook2.getInstuctorName() &lt;&lt; endl;
  
      gradeBook.displayMessage();
  
      return 0;
  }
  </code></pre>
  
  <p>Here is the header file. I added in the #ifndef to prevent possible looping errors based on research into this problem.</p>
  
  <pre><code>#ifndef GRADE_H
  #define GRADE_H
  
  
  #include &lt;string&gt;
  #include "GradeBook.cpp"
  
  // __Grade_Book__
  class GradeBook
  {
      std::string courseName, instructorName;
  
  public:
      // constructor initializes courseName with string  supplied an argument
      GradeBook( std::string name);
  
      //function sets the course name and limits length
     void setCourseName(std::string name);
     void setInstructorName(std::string iName);
  
  
      //function gets the course name
      std::string getCourseName();
      std::string getInstructorName();
  
      //function displays a welcome message
      void displayMessage();
  
  };
  #endif
  </code></pre>
  
  <p>This is the source file where the error " 'GradeBook' does not name a type' occurs at the first instance of GradeBook despite being linked to the header file. I feel as though this file is not completely necessary for this code but it is required for the assignment. I'm wondering if I have messed up with the communication of the files creating a loop but everything I have tried has led to the same compiling error, insisting that the class GraddeBook has not been defined.</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include "GradeBook.h"
  
  using namespace std;
  
  
  
  // constructor initializes courseName with string supplied an argument
  
  GradeBook::GradeBook(string name)
  
  {
      setCourseName(name);
      setInstructorName (iName);
       // call set function to initialize courseName
  }
  //function sets the course name
  void GradeBook::setCourseName(string name)
  {
      if (name.length() &lt;= 30)
          courseName = name;
      else
      {
          courseName = name.substr(0, 30); //start at 0, length of 30
          cout &lt;&lt; "Course Name \" " &lt;&lt; name &lt;&lt; "\" exceeds maximum length (30).\n"
          &lt;&lt; "Limiting courseName to the first 30-characters.\n" &lt;&lt; endl;
      }
  }
  void GradeBook::setInstuctorName(string iName)
  {
      if (iName.length() &lt;= 20)
          instructorName = iName;
      else
      {
          instructorName = iName.substr(0, 30); //start at 0, length of 30
          cout &lt;&lt; "Instructor Name \" " &lt;&lt; iName &lt;&lt; "\" exceeds maximum length (20).\n"
          &lt;&lt; "Limiting Instructor Name to the first 20-characters.\n" &lt;&lt; endl;
      }
  }
  
  //function gets the course name
  string GradeBook::getCourseName()
  {
      return courseName;
  }
  
  string GradeBook::getInstructorName()
  {
      return InstructorName;
  }
  //function displays a welcome message
  void GradeBook::displayMessage()
      {
          cout &lt;&lt; "Welcome to the Grade book for: \n" &lt;&lt; getCourseName() &lt;&lt; endl;
          cout &lt;&lt; "This course is presented by: \n" &lt;&lt; getInstructorName() &lt;&lt; endl;
      }
  </code></pre>