侯成三国群英传2:在定义中有太多的类型

来源:百度文库 编辑:中科新闻网 时间:2024/04/28 00:40:24
#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;
}; /*注意这里要有分号*/