struct 问题
来源:百度知道 编辑:UC知道 时间:2024/06/28 17:33:42
结构如下:
typedef struct {
int no;
char name[20];
int age;
}
请问其中的含义是什么?
typedef struct {
int no;
char name[20];
int age;
}
请问其中的含义是什么?
typedef struct {
int no;
char name[20];
int age;
}student;这样比较完整。
~~~ struct {
int no;
char name[20];
int age;
}~~中间的这部分是定义了一个结构体,
typedef {~~
~~~
~}student;是给这个结构体起了个名字,比如student
感觉掉了东西。没发完整吧,结构体的后面应该有个名称。
typedef struct AAA{
int no;
char name[20];
int age;
};
AAA Str_param;
结构体,也就是自己定义的类型
这个类型有3部分组成
一个int
一个数组
一个int
定义了一个结构,结构里面有三个变量:no,name[20],age!
这个语法应该有问题,,编译过不了吧!