64,676
社区成员
发帖
与我相关
我的任务
分享
#include<iostream>
#include<string>
using namespace std;
class student
{
string name;
int age;
public:
student(string a,int b)
:name(a),age(b)
{
};
~student()
{
}
inline string GetName()
{
return this->name;
}
};
void main()
{
student st("liss",12);
cout << st.GetName() << endl;
}