#include<iostream>
using namespace std;
class Student;
class College{
public:
void haha(Student *p);
};
class Student{
private:
int sid;
int age;
char gender;
public:
Student():sid(-2),age(-1),gender('M'){}
Student(int sid,int age,char gender):sid(sid),age(age),gender(gender){}
Student(Student &r):sid(r.sid),age(r.age),gender(r.gender){}
~Student(){
cout << "byebye" << endl;
}
void hoho();
int getSid(){
return sid;
}
void setSid(int sid){
this->sid=sid;
}
friend void College::haha(Student *p);
};
void College::haha(Student *p){
cout << p->sid << endl;
}
void Student::hoho(){
cout << "This year I am " << this->age << endl;
}
int main(){
Student lisi(1001,20,'M');
Student *p;
p=&lisi;
College baobei;
Student zhangsan=lisi;
cout<<zhangsan.getSid()<<endl;
baobei.haha(p);
return 0;
}