# 特殊的日子，再写一编来纪念，以后一天争取一编

#include <iostream>
#include <stdio.h>

using  namespace std;

struct myTest
{
int a;
int b;
myTest *next;
};

{
myTest *tt = new myTest;
tt->a =a;
tt->b = b;

{
tt->next =NULL;
}else
{

while (mm->next != NULL)
{
mm = mm->next;
}

mm->next = tt;
tt->next = NULL;

}

}

void PrintfNodes(int a,int b)
{
printf("a=%d b=%d/n",a,b);
}

void showNodes()
{

PrintfNodes(p->a,p->b);

while (p->next != NULL)
{
p = p->next;
PrintfNodes(p->a,p->b);
}
return;
}

void DeleteNodes(int a)
{

{
return;
}

while (p!= NULL)
{
if (p->a == a)
{
{
delete p;
}else
{
myTest *tt = p->next;
delete p;
r->next= tt;
p= tt->next;
}
}else
{
myTest *tt = p->next;
r=p;
p = tt;
}
}

return;
}

void main()
{
int a =1;

cout<<"输入0 退出，1添加，2查看，3删除/n";
while (a>0)
{
cout<<"请输入操作标记 flag =";
cin>>a;
switch(a)
{
case 0:
exit(0);
break;
case 1:
{
int c,d;
cout<<"请输入a=";
cin>>c;
cout<<"请输入b=";
cin>>d;
break;
}
case 2:
showNodes();
break;
case 3:
{
cout<<"请输入a =";
int kz =0;
cin>>kz;
DeleteNodes(kz);
break;
}
default:
break;

}
}

}

• 本文已收录于以下专栏：

举报原因： 您举报文章：特殊的日子，再写一编来纪念，以后一天争取一编 色情 政治 抄袭 广告 招聘 骂人 其他 (最多只允许输入30个字)