主要熟悉链表的创建、插入(头插和尾插)、删除。遍历操作
#include <iostream>
#include<algorithm>
#include<cstring>
#include<cstdio>
using namespace std;
const int N=220;
typedef struct node
{
int number; //编号
char name[40]; //姓名
char tel[40]; //电话
char email[40]; //电子邮箱
node* next;
}Node,*pNode;
void Query(pNode head,char *name)
{
int f=0;
pNode p=head->next;
while(p!=0)
{
if(strcmp(p->name,name)==0)
{
cout<<p->number<<" "<<p->name<<" "<<p->tel<<" "<<p->email<<endl;
f=1;
}
p=p->next;
}
if(f==0)
cout<<"NOT FOUND!"<<endl;
}
void modify(pNode &head,char *name,char *info,char *change)
{
pNode p=head->next;
while(p!=0)
{
if(strcmp(p->name,name)=&#