也是非常简单好吧!
2023-12-19 18:06:06
发布于:广东
260阅读
0回复
0点赞
这道题涉及到了一个新概念:
结构体 struct
结构体用struct定义,上代码吧
#include<bits/stdc++.h>
using namespace std;
struct information{
string name = "张三" ;
double chengji=98.5;
int age=12;
};
int main()
{
information s;
cout<<s.name<<" "<<s.chengji<<" "<<s.age;
return 0;
}
/*
struct
*/
全部评论 1
新概念应该是struct 结构体变量,而且暴力输出即可
2025-12-15 来自 浙江
0










有帮助,赞一个