呼市楠湖郦舍 学校规划:在定义中有太多的类型

来源:百度文库 编辑:神马品牌网 时间:2024/05/10 14:03:20
#include <stdio.h>
#include <string.h>
#include <conio.h>
#include <stdlib.h>
#define N sizeof(struct stud)
#define NULL 0

struct score
{ int chinese;
int math;
int english;
int phy;
int maks;
}

struct stud
{ long num;
char name[10];
char gender[4];
struct score score;
struct stud *next;
}

定义struct类型注意要在后面加个分号;,如
struct score
{
int chinese;
}; /*注意这里要有分号*/