title: C++ , Student Class with set and get functions
body: <p>I've tried to write a class for a student information(name,IDno,and degree), this information will be printed on the screen; but I don't know where is the errors?! </p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;conio.h&gt;
  using namespace std;
  
  class Student {
  private:
      char name;
      int idnumber;
      char degree;
  public:
      Student(char,int,char);
      void setName(char n){name = n;}
      int getName(){return name;}
      void setIdnumber(char id){idnumber = id;}
      int getIdnumber(){return idnumber;}
      void setDegree(char d){degree = d;}
      int getDegree(){return degree;}
  };
  Student::Student(char n,int id,char d){
      name = n;
      idnumber = id;
      degree = d;
  }
  
  int main(){
      Student s1, s2;
      s1.setName(Sara);
      s1.setIdnumber(333);
      s1.setDegree(A);
      s2.setName(Jack);
      s2.setIdnumber(222);
      s2.setDegree(B);
      cout &lt;&lt; "name: " &lt;&lt; s1.getName() &lt;&lt; ",IDnumber: " &lt;&lt; s1.getIdnumber() &lt;&lt; ",Degree: " &lt;&lt;      s1.getDegree() &lt;&lt; endl;
      cout &lt;&lt; "name: " &lt;&lt; s2.getName() &lt;&lt; ",IDnumber: " &lt;&lt; s2.getIdnumber() &lt;&lt; ",Degree: " &lt;&lt; s2.getDegree() &lt;&lt; endl;
  
      getch();
      return 0;
  }
  </code></pre>