创建链表
node* createlist(int n){
node* head=new node;
head->next=NULL;
node* p=head;
for(int i=0;i<n;i++){
node*q=new node;
cin>>q->s.num>>q->s.name;
q->next=p->next;
p->next=q;
p=q;
}
return head;
}
遍历输出链表
void outputlist(node* head){
node *p=head->next;
while(p){
cout<<p->s.num<<" "<<p->s.name<<endl;
p=p->next;
}
}