2_12.cpp
来自「异质链表查询.存储不同的结构」· C++ 代码 · 共 18 行
CPP
18 行
//2_12.cpp
#include <iostream>
#include <iomanip>
using namespace std;
struct student //学生信息结构体
{
int num; //学号
char name[20]; //姓名
char sex; //性别
int age; //年龄
}stu={97001,"Lin Lin",'F',19};
void main()
{
cout<<setw(7)<<stu.num<<setw(20)<<stu.name<<setw(3)<<stu.sex
<<setw(3)<<stu.age;
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?