class student
{
public:
student(){}
student(const std::string &name,char &c,unsigned &age):stdname(name),sex(c),stdage(age){}
friend std::ostream &operator<<(std::ostream &,const student &);
~student(){}
private:
std::string stdname;
char sex;
unsigned stdage;
};
std::ostream &operator>>(std::istream &os,const student &std)
{
os<<std.stdname<<' '<<std.sex<<' '<<std.stdage;
return os;
}
int main()
{
student st("zhangjiao",'m',21);
std::cout<<st<<std::endl;
return 0;
}