xiao dong 2 years ago
parent 116042d327
commit 151361ebe1

@ -1,7 +1,28 @@
#define NAME_LEN 31
#define MAX_PARTS 100
struct students
{
int number;
char name[NAME_LEN + 1];
int score;
};
static struct students stu[MAX_PARTS];
static int num_parts = 0;
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
//定义常量
#define CMD_QUIT 0
#define CMD_QUERY 4
#define CMD_INSERT 5
#define CMD_UPDATE 6
#define CMD_DELETE 7
#define CMD_READ 1
#define CMD_SAVE 2
#define CMD_PRINT 3
#define CMD_SORT 8
#define CMD_CHART 9
// 函数定义 // 函数定义
void init(void) void init(void)

@ -1,27 +1,6 @@
#define NAME_LEN 31 #define NAME_LEN 31
#define MAX_PARTS 100 #define MAX_PARTS 100
struct students
{
int number;
char name[NAME_LEN + 1];
int score;
};
static struct students stu[MAX_PARTS];
static int num_parts = 0;
//定义常量
#define CMD_QUIT 0
#define CMD_QUERY 4
#define CMD_INSERT 5
#define CMD_UPDATE 6
#define CMD_DELETE 7
#define CMD_READ 1
#define CMD_SAVE 2
#define CMD_PRINT 3
#define CMD_SORT 8
#define CMD_CHART 9
// 菜单命令的编号
// 函数声明 // 函数声明
void init(void); void init(void);

Loading…
Cancel
Save