64,636
社区成员
发帖
与我相关
我的任务
分享
#include <iostream>
#include <string>
using namespace std;
struct student
{
string name;
string number;
int age;
};
int main()
{
struct student stu={"zhangsan","123456789",21};
cout<<stu.name<<" "<<stu.number<<" "<<stu.age<<endl;
system("pause");
return 0;
}
struct
{
int a;
char b;
float f;
}var = {.a = 100, .b = '!', .f = 0.045f};