You need to create 2 functions:
string Student::getAsString()const{
ostringstream oss;
oss << "Student name: " << name << " " << fakn << " " << srus; //etc
return oss.str();
}
ostream & operator<<( ostream & exit, const Student & ob){
return exit << "Exit:" << ob.getAsString() << endl;
}
And dont forget to add the respective libraries:
#include <string>
#include <sstream>
#include <iostream>