void insert(int x,list)
{
list *p,*q,*nd,**list;
nd=(*list)calloc(1,sizeof(list)); =>這一行有問題,可是我不知道它的語法是什
nd->data=x; 麼才對?
if(*list==NULL){
nd->link=NULL;
*list=nd;
}
else{
if(x<p->x){
nd->link=p;
*list=nd;}
else{
while(p!=NULL&&x>p->x)
q=p;p=p->link;
}
}
}
--
妳好呀~~我是藍月~~很高興認識妳~~
--
◎ [1;31m龍 [32m貓 [33m資 [34m訊 [35m天 [36m地 [0m( [1mbbs.mgt.ncu.edu.tw [0m)
◎[ [1;33;46mnew852072 [0m]來自: 210.240.249.31