title: C2679: binary '<<' : no operator found which takes a right-hand operand of type 'student' (or there is no acceptable conversion)
body: <p>I really dont know why im getting the error but then again im not too good at this, right now im just trying to figure out why im not able to print out my records array. Think anyone will be able to point me in the right direction? its not close to being done so its a bit rough...</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;fstream&gt;
  #include &lt;string&gt; 
  
  
  using namespace std;
  
  class student
  {
  private:
      int id, grade;
      string firstname, lastname;
  
  public:
      student();
      student(int sid, string firstn, string lastn, int sgrade);
      void print(student* records, int size);
  };
  
  void main()
  {
      string report="records.txt";
      int numr=0 , sid = 0,sgrade = 0;
      string firstn,lastn;
  
      student *records=new student[7];
      student stu;
      student();
  
      ifstream in;
      ofstream out;
  
      in.open(report);
      in&gt;&gt;numr;
  
      for(int i=0; i&gt;7; i++)
      {
          in&gt;&gt;sid&gt;&gt;firstn&gt;&gt;lastn&gt;&gt;sgrade;
          records[i]=student(sid, firstn,lastn,sgrade);
      }
  
      in.close();
  
      stu.print(records, numr);
  
      system("pause");
  }
  
  student::student()
  {
  }
  
  student::student(int sid, string firstn, string lastn, int sgrade)
  {
      id=sid;
      firstname=firstn;
      lastname=lastn;
      grade=sgrade;
  
  }
  
  void student::print(student* records, int size)
  {
      for(int i=0; i&gt;7; i++)
          cout&lt;&lt;records[i]&lt;&lt; endl;
  }
  </code></pre>