title: Error no member function declared in class when compiling
body: <p>I am pretty new to c++ and have no idea why I am getting this error, except that I think it's to do with using the string type for getter methods.</p>
  
  <p>The error message:</p>
  
  <pre><code>C:\Users\Robin Douglas\Desktop\week6&gt;g++ -c Student.cpp
  Student.cpp:15:31: error: no 'std::string Student::get_name()' member function d
  eclared in class 'Student'
  Student.cpp:20:43: error: no 'std::string Student::get_degree_programme()' membe
  r function declared in class 'Student'
  Student.cpp:25:32: error: no 'std::string Student::get_level()' member function
  declared in class 'Student'
  </code></pre>
  
  <p>Student.hpp</p>
  
  <pre><code>#include &lt;string&gt;
  
  class Student
  {
      public:
          Student(std::string, std::string, std::string);
          std::string get_name;
          std::string get_degree_programme;
          std::string get_level;
      private:
          std::string name;
          std::string degree_programme;
          std::string level;
  };
  </code></pre>
  
  <p>Student.cpp</p>
  
  <pre><code>#include &lt;string&gt;
  #include "Student.hpp"
  
  Student::Student(std::string n, std::string d, std::string l)
  {
      name = n;
      degree_programme = d;
      level = l;
  }
  
  std::string Student::get_name()
  {
      return name;
  }
  
  std::string Student::get_degree_programme()
  {
      return degree_programme;
  }
  
  std::string Student::get_level()
  {
      return level;
  }
  </code></pre>