c程序课程设计 通讯录 急! 望达人帮忙!! 谢了

来源:百度知道 编辑:UC知道 时间:2024/05/04 07:25:43
通讯录至少应该有以下数据项:姓名,地址,手机,邮编,E-mail。
对通讯录应该包含有以下操作:向通讯录中添加信息,在通讯录中按姓名查找个人信息,删除通讯录中的个人信息,按不同数据项排序后列表输出通讯录中所有人的信息。通讯录中记录的数量可以是有限制的。
程序的主界面如下:

通讯录
1. 添加
2. 查询
3. 删除
4. 排序
5. 全部输出
0. 退出

提示
在没有使用文件时,通讯录数据可以保存在一个大的数组中,上面列出的数据项应该是字符串类型。

望达人帮忙啊 谢谢了
谁能帮我编一个完整的``能直接读的程序阿 谢谢了

#include <iostream>
#include <string>
#include "address.h"
#include "addressList.h"
#include "addressBook.h"
using namespace std;
int main()
{
new AddressBook; //开启通信录
return 0;
}
ostream& operator<<(ostream& os, const RecordList& c_rl)
{
RecordList::const_iterator it;
RecordList::const_iterator it_end =c_rl.end();
for (it=c_rl.begin();it!=it_end; it++)
{
os << (*it)->name << '\n' << (*it)->tel << '\n';
}
return os;
}
istream& operator>> (istream& is, RecordList& rl)
{
Record* rec;
string name;
while (true)
{

//注意这里使用的是全局的getline()函数,而不是istream的成员函
//数.全局的getling()函数将从istream中取出最后一个分隔符,
//而istream的成员函数getline则不会
getline(is,name);
if (name =="")
break;
rec = new Recor