python实现通讯录管理系统代码_通讯录管理系统的设计与实现c++源代码
通讯录管理系统的设计与实现源代码#include#include#include#includeusingnamespacestd;structStudent{stringnum;//学号stringname;//姓名intage;chartel;charaddr;charemal;Student*next;};longiCount=0;Student*head=N...
通讯录管理系统的设计与实现源代码
#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;
更多推荐
所有评论(0)