#include <iostream>
using namespace std;
struct stu{
char sex='n';
int age=20;
void set(string n,int s);
void fun(){
cout << name << endl;
cout << scroe << endl;
}
private:
string name;
int scroe;
};
void stu::set(string n,int s)
{
name=n;
scroe=s;
}
int main()
{
stu a;
a.set("yushiyue",100);
cout << a.sex << endl;
cout << a.age << endl;
a.fun();
return 0;
}
xmind