struct student{
int age;
string name;
student(int a,string n):age(a),name(n){}
};
int main()
{
student I=student(20,"ye");
cout<<I.age<<","<<I.name<<endl;
return 0;
}
c | 结构体的定义
于 2022-02-17 20:59:06 首次发布