#include
#include
#include
int
saveflag=0;
/*
单链表内容有无发生改变,是否需要存盘的标志
变量
*/
struct employee
{
char num[10];
/*
工号
*/
char name[15];
/*
姓名
*/
char sex[7];
/*
性别
*/
int age;
/*
年龄
*/
char education[15];
/*
学历
*/
int salary;
/*
工资
*/
char phone[20];
/*
电话号码
*/
char address[30];
/*
住址
*/
};
typedef struct Node
{
struct employee data;
struct Node *next;
}ListNode,*LinkList;
void InitList(LinkList *head)
/*
将单链表初始化为空。
动态生成一个头结点,
并
将头结点的指针域置为空
*/
{
if((*head=(LinkList)malloc(sizeof(ListNode)))==NULL)
/*
为头结点分配一
个存储空间
*/
printf("
系统分配存储空间失败!
\n");
exit(-1);
(*head)->next=NULL;
/*
将头结点的指针域置为空
*/
}
ListNode *Locatenum(LinkList head,char find[])
//
通过职工工号查找,
返回定
位指针。
{
LinkList p;