同样我们先贴上代码
int user_show()
{
int i = 0;
int j = 0;
int k = 0;
int count = 0;
int t = 0;
STAFF_T *a = NULL;
STAFF_T *b = NULL;
pNode* temp = NULL;
pNode* p = NULL;
pNode *thead = NULL;
STAFF_T *l = NULL;
STAFF_T *g = NULL;
int a_num =0;
int b_num = 0;
char *name = NULL;
char *salary = NULL;
//STAFF_T *temp = NULL;
char *s = {0};
thead = (pNode *)malloc(sizeof(pNode *));
thead = LIST_Init(NULL);
//开辟结构体空间
s = (char *)malloc(sizeof(char *));
g = (STAFF_T *)malloc(sizeof(STAFF_T));
l = (STAFF_T *)malloc(sizeof(STAFF_T));
name = (char *)malloc(sizeof(char *));
salary=(char *)malloc(sizeof(char *));
thead=FILE_read(staff_fp,sizeof(STAFF_T));
count = LIST_GetCount(thead);
for (temp = thead; temp->next != NULL; temp = temp->next)
{
for (p = thead; p->next != NULL; p = p->next)
{

博客内容介绍了如何实现员工管理系统的序号排序功能。通过读取文件数据,使用冒泡排序算法对数据进行排序,然后利用链表展示排序结果,整个过程不直接修改原始文件以降低操作难度。
最低0.47元/天 解锁文章
1301

被折叠的 条评论
为什么被折叠?



