员工管理系统之序号排序

博客内容介绍了如何实现员工管理系统的序号排序功能。通过读取文件数据,使用冒泡排序算法对数据进行排序,然后利用链表展示排序结果,整个过程不直接修改原始文件以降低操作难度。
摘要由CSDN通过智能技术生成

同样我们先贴上代码

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 !&#
  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值