common.h

来自「可以对员工进行增加,删除,修改,查询等功能!」· C头文件 代码 · 共 51 行

H
51
字号
#ifndef COM_H //条件编译,防止同一文件被包含多次
#define COM_H 

#include<stdio.h>
#include<string.h>
#include<stdlib.h>
#include<math.h>


struct date{
	int year;
	int month;
	int day;
};
typedef struct MEM{
	char number[10];
	char name[20];
	int role;
	int age;
	float high;
	float weight;
	float salary;
	struct date joinDate; //加入公司的日期
}MEMBER;

extern char * roleSet[4];

#define FILENAME "team.dat"
//#define FILENAME "c:\\team.dat"//存储数据的文件的路径
#define MAX 100

void newNode(MEMBER team[],int count);
void showMenu();
void showAll(MEMBER team[],int count);
int addMember(MEMBER team[],int count);
void sortByName(MEMBER team[],int count);
void list(MEMBER team[],int count);
int loadFromFile(MEMBER team[]);
void writeToFile(MEMBER team[],int count);
void sort(MEMBER team[],int count,int style);
void queryByName(MEMBER team[],int count);
void queryByNumber(MEMBER team[],int count);
int deleteByNumber(MEMBER team[],int count);
void countMember(int count);
void countSalary(MEMBER team[],int count);
void reportControl(MEMBER team[],int count);
void showReportMenu();
void  outputReport( MEMBER team[],int count,char *fields);
void reportByRole(MEMBER team[],int count);
#endif

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?