求一个数据结构的链表通讯录

来源:百度知道 编辑:UC知道 时间:2024/05/17 07:08:30
用C语言实现 ,要用链表结构
数据结构:学号、姓名、性别、年龄、家庭住址、邮编、电话
功能:
1、数据录入--按顺序录入学生记录;
2、删除记录--删除特定记录或全部记录;
3、修改记录--修改选定记录;
4、查询记录--按学号进行查询;
5、记录排序--按学号增序排序;
6、退出操作
希望各位高手帮帮忙,时间不多啦!

//再次贴我的这个程序——只要把相应的项改成你要的就行……无语中,那么多人用这个程序
#include <iostream.h>
#include <string.h>
#include <stdlib.h>

class List{
public:
string goods;
string status;
int value;
int num;
int pos;
List* next;
};

class Head{
public:
List* next;
int ListLength;
};

string CUR_FILE("UNTITLED");
bool PrintList(Head* p);
bool BuildTXT(Head*,string);

void PrintTXT(string filename){
string option="if exist ";
option=option+filename+" type "+filename;
system(option);
}//PrintTXT

bool InitList(Head* &p){
if(!(p=new Head)) return false;
else{
p->ListLength=0;
p->next=NULL;
return true;
}
}//InitList

bool Number(Head* &p){
List* lp=p->next;
int i=0;
while(lp){
lp->pos=i;
lp=lp->next;
i+