老是提示"Access Violation",求教
m1043 2011-11-23 08:34:35 #include <iostream>
#include <cstring>
using namespace std;
typedef char DataType;
#define N 30
struct stu
{
char name[N];
char num[10];
char mail[N];
struct stu *next;
int seletion;
char date[N];
};
char popList(stu *H)
{
stu *p=H;
while(p->next){
cout<<"你的姓名是:";
cin>>p->next->name;
cout<<"你的手机号码是:";
cin>>p->next->num;
cout<<"你的邮件是:";
cin>>p->next->mail;
cout<<"继续录入请按0 否则请按1";
cin>>p->next->seletion;
if (p->next->seletion==0)
{
p=p->next;
popList(p);
}
if(p->seletion==1)
return 1;
}
}