通讯录管理系统的设计与实现源代码

#include 

#include 

#include 

#include

using namespace std;

struct Student

{

string num;//

学号

string name;//

姓名

int age;

char tel;

char addr;

char emal;

Student *next;

} ;

long iCount=0;

Student *head=NULL;

Student *pEnd=NULL;

void LoadRecords(char *path)//

从文本里面读取记录

{

fstream infile(path,ios::in);

if(!infile){}

else

{

infile>>iCount;

int t=iCount;

if(iCount!=0)

{

for(;iCount>0;iCount--)

{

Student *p=new Student;

infile>>p->num>>p->name>>p->Maths;

if(head==NULL)

{

head=p;pEnd=p;pEnd->next=NULL;

}

else

{

pEnd->next=p;

pEnd=pEnd->next;

pEnd->next=NULL;

Logo

瓜分20万奖金 获得内推名额 丰厚实物奖励 易参与易上手

更多推荐