title: Can't create a class using headers
body: <p>I'm learning C++ from the book Primer C++.
  Differently from what I used to do in Java, I learnt that is good practice defining classes and classes' methods' prototypes in a header file.
  So I did it, following step by step the book, implementing the methods and constructors in a .cpp file.</p>
  
  <p>The result is an endless amount of error reports.</p>
  
  <p><strong>Student.h</strong></p>
  
  <pre><code>#ifndef STUDENT_H_
  #define STUDENT_H_
  class Student{
      private:
          string firstname;
          string lastname;
          double gpa;
      public:
          Student();
          Student(string fname,string lname, double aGpa);
          ~Student();
          void Show();
          double getGpa();
  };
  #endif
  </code></pre>
  
  <p><em>On compile returns the following errors:</em></p>
  
  <ul>
  <li>unknown name type "class"</li>
  <li>expected { etc etc after the Student
  attribute (of course, since it can't understand it's a class)</li>
  </ul>
  
  <p>I also tried to include the cstring and the string library (both couldn't be found by the compiler, I suppose because it's something only a .cpp file can access) ending with using the  library, but that didn't change a thing.</p>
  
  <p><strong>Student.cpp</strong></p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;cstring&gt;
  #include "student.h"
  
  using std::cout;
  using std::cin;
  using std::endl;
  
  
  Student::Student(){
      cout &lt;&lt; "Default constructor called\n";
      cout &lt;&lt; "No info regarding the student. Object not initialized";
  }
  Student::Student(string fname,string lname, double aGpa){
      this-&gt;firstname=fname;
      this-&gt;lastname=lname;
      this-&gt;gpa=aGpa;
  }
  void Student::Show(){
      cout &lt;&lt; lastname &lt;&lt;", " &lt;&lt; firstname &lt;&lt;"\nGPA: " &lt;&lt; gpa &lt;&lt; endl;
  }
  double Student::getGpa(){
      return this-&gt;gpa;
  }
  Student::~Student(){
      cout&lt;&lt; "Object student has been destroyed";
  }
  </code></pre>
  
  <p><em>On compile returns the following errors</em></p>
  
  <ul>
  <li>string (in student.h) does not name a type (even if I include string.h)</li>
  <li>in Student.h, expected ')' before fname (in the constructor declaration)</li>
  <li>in Student.cpp, expected constructor before '(' token (in the constructor declaration)</li>
  <li>In function Show(), lastname and firstname etc are not declared in this scope (but GPA is apparently)</li>
  </ul>