#include <iostream>
using namespace std;
#include <string>
struct student {
//结构体
string name;
int age;
int score;
};
int main(){
struct student stul;
stul.name="zhangsan";
stul.age=20;
stul.score=90;
cout<<"姓名"<<stul.name<<"年龄:"<<stul.age<<"分数:"<<stul.score<<endl;
system("pause");
return 0;
}
结构体-结构体基本概念
于 2021-10-29 22:15:10 首次发布