📄 typedef02.cpp
字号:
//typedef02.cpp
#include <iostream.h>
#include <conio.h>
typedef struct {
char s[80];
}str80;
struct ax {
int a[20];
};
typedef ax a20; //复位类型
void main()
{ str80 s1;
cout <<"s1=";
cin.getline(s1.s,80); //以字段处理
cout << s1.s << endl;
a20 p;
for (int i=0;i<20;i++)
{ p.a[i] = i+1; //以字段处理
cout << p.a[i] <<' ';
}
getch();
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -