PTA基础编程题 7 您所在的位置:网站首页 厘米与尺的换算题目 PTA基础编程题 7

PTA基础编程题 7

2024-07-09 13:43| 来源: 网络整理| 查看: 265

PTA 6-5 链式表操作集(详解)

苏格拉没有底w: 为什么这么写就不对了呀,大家可以看一下嘛 [code=csharp] List Insert( List L, ElementType X, Position P ){ Position current = L->Next,pre=L; PtrToLNode node = (PtrToLNode)malloc(sizeof(struct LNode)); node->Data = X; node->Next = NULL; if(L == P){ node->Next = L; L = node; return L; } while(current){ if(P == current){ node->Next = current; pre->Next = node; return L; } pre = current; current = current->Next; } printf("Wrong Position for Insertion\n"); return ERROR; } [/code]



【本文地址】

公司简介

联系我们

今日新闻

    推荐新闻

    专题文章
      CopyRight 2018-2019 实验室设备网 版权所有