title: prototype for "...." does not match any in class "..."
body: <p>I started to pick up some c++ programming and i am learning the concept of classes and objects. So I looked on the web for some exercises I can practice on. I have read that it is good practice to have the main, header and constructor file separated and not into one long file. </p>
  
  <p>I'm trying to break the following code into three separate files :</p>
  
  <pre><code>// Exercises: Classes
  // Exercise 3
  
  
  // Exercises: Classes
  // Exercise 3
  
  
  #include &lt;iostream&gt;
  using namespace std;
  
  class Student{
  
  public:
  char *name;
  int mark1;int mark2;
  
  Student(char* na, int ma1,int ma2){
  name=na;mark1=ma1;mark2=ma2;
  }
  
  
  
  int calc_media(){return (mark1+mark2)/2;}
  
      void disp(){
      cout &lt;&lt; "Student:" &lt;&lt; name &lt;&lt; " \n media:"&lt;&lt; calc_media() &lt;&lt;"\n";
      }
  
  };
  
  int main(){
  
      char* nam;int m1,m2;
  
      cout &lt;&lt; "Enter name:";
      cin&gt;&gt; nam;
      cout &lt;&lt; "Enter marks of two subjects:";
      cin&gt;&gt; m1;
      cin&gt;&gt; m2;
      Student student1(nam,m1,m2);
      student1.disp();
  
      return 0;
  }
  </code></pre>
  
  <p>into the following files:</p>
  
  <p>main.cpp:</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;string&gt;
  #include "student_example.h"
  using namespace std;
  
  int main()
  {
     int marc1,marc2;
     char nam;
  
     cout&lt;&lt;"Please enter the name of the student:  ";
     cin&gt;&gt;nam;
     cout&lt;&lt;"Please enter the two grades of the student"&lt;&lt;"\n grade one:";
     cin&gt;&gt;marc1;
     cout&lt;&lt;"Grade two";
     cin&gt;&gt;marc2;
  
     student_Example student1;
     student1.disp();
  
     return 0;
  }
  </code></pre>
  
  <p>header file (student_Example.h)</p>
  
  <pre><code>#ifndef STUDENT_EXAMPLE_H
  #define STUDENT_EXAMPLE_H
  #include &lt;iostream&gt;
  #include &lt;string&gt;
  
  class student_Example
  {
      public:
          char name;
          int mark1, mark2;
  
          int calc_media(){
             return (mark1+mark2/2);
             }
  
  void disp(){
             std::cout&lt;&lt; " The student named: "&lt;&lt; name&lt;&lt; "\n has an average score equal to: " &lt;&lt; calc_media()&lt;&lt;"\n";
          }
  };
  </code></pre>
  
  <p>And constructor:</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;string&gt;
  
  #include "student_Example.h"
  
  student_Example::student_Example(char nam, int marc1, int marc2)
  {
      name=nam;
      mark1=marc1;
      mark2=maec2;
  
  }
  </code></pre>
  
  <p>Im getting the error</p>
  
  <pre><code>"error: prototype for **'student_Example::student_Example(char, int, int)' does not match any class 'student_Example'**
  </code></pre>
  
  <p>Any advice what may be going on here? Thanks in advance :)</p>