标题:希望有好人人帮我注释一下,表示很多地方看不懂
只看楼主
逗比
Rank: 1
等 级:新手上路
帖 子:23
专家分:0
注 册:2014-10-31
结帖率:60%
 问题点数:0 回复次数:1 
希望有好人人帮我注释一下,表示很多地方看不懂
//   按英语成绩排序
struct stu  *sort_english(struct stu  *head)   
{
    struct stu  *p;
    struct stu  *p1;
    struct stu  *p2;
    struct stu  *p3;
    struct stu  h;
    struct stu  t;
    if (head == NULL)
    {
        return NULL;
    }
    h.next=head;
    p=&h;
    while (p->next!=NULL)
    {
        p=p->next;
    }
    p=p->next=&t;
    while (p!=h.next)
    {
        p3=&h;
        p1=p3->next;
        p2=p1->next;
        while (p2!=p)
        {
            if ((p1->s[2] )<(p2->s[2]))
            {
                p1->next=p2->next;
                p2->next=p1;
                p3->next=p2;
                p3=p2;
                p2=p1->next;
            }
           else
            {
                p3=p1;
                p1=p2;
                p2=p2->next;
            }
        }
        p=p1;
    }
    while (p->next!=&t)
    {
        p=p->next;
        }
    p->next=NULL;
    return h.next;
}
2015-12-26 13:08
ehszt
Rank: 12Rank: 12Rank: 12
等 级:贵宾
威 望:40
帖 子:1728
专家分:3216
注 册:2015-12-2
得分:0 
做个标记,等会儿看
2015-12-26 13:32



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-460572-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.393692 second(s), 7 queries.
Copyright©2004-2025, BCCN.NET, All Rights Reserved