#ifndef _COMMON_H_
#define _COMMON_H_
#ifndef UNICODE
#define UNICODE
#define MAX 20
#endif
#include"windows.h"
#include<stdio.h>
#include<stdlib.h>
#include<time.h>
#include<string.h>
#include "conio.h"
struct data {
int year;
int month;
int day;
};
typedef struct MEM {
char number[10];
char name[10];
float high;
float weight;
int role;
int age;
float salary;
struct data joinDate;//加入日期
struct MEMBER *next;
} MEMBER;
int style[5];
主函数
#include"common.h"
int main(void)
{
char select;
MEMBER *head;
head=(MEMBER*)malloc(sizeof(MEMBER));
if(head==NULL)
{
printf("内存不足");
exit(1);
}
head->next=NULL;
while(1)
{
showMenu();
select=getch();
switch(select)
{
case '1' :showAll();break;
case '2' :addMember(head);break;
case '3' :deleteByNumber( );break;
case '4' :queryByName( );break;
case '5' :queryByNumber();break;
case '6' :sortByName( );break;
case '7' :sortBySalary( );break;
case '8' :reportControl( );break;
case '0' :printf("\t\tbyebye\n");
exit(0);
default : printf("\t\terror!!!重新选择\n");
Sleep(500);
fflush(stdin);
}
}
}
想知道 CASE 2 那个函数该如何的编写