张艺文名字起得好吗:在定义中有太多的类型

来源:百度文库 编辑:高校问答 时间:2024/07/07 13:19:05
#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;
}; /*注意这里要有分号*/