C++通讯功能管理系统课程设计Word格式文档下载.docx
- 文档编号:19910434
- 上传时间:2023-01-12
- 格式:DOCX
- 页数:15
- 大小:17.06KB
C++通讯功能管理系统课程设计Word格式文档下载.docx
《C++通讯功能管理系统课程设计Word格式文档下载.docx》由会员分享,可在线阅读,更多相关《C++通讯功能管理系统课程设计Word格式文档下载.docx(15页珍藏版)》请在冰豆网上搜索。
;
for(inti=0;
i<
57;
i++)
Sleep(50);
'
>
}
system("
cls"
);
**************************"
1、查询功能"
2、修改功能"
3、增加功能"
请输入相应的信息来操作"
select_function();
voidselect_function(void)
intselect_number;
cin>
select_number;
switch(select_number)
case1:
browse();
submenu();
break;
case2:
system("
change_information();
submenu();
break;
case3:
add_information();
default:
voidsubmenu(void)
1、continue2、exit"
请选择继续还是退出"
cin.sync();
default:
exit(0);
voidbrowse(void)
你想要浏览的类别是什么?
1、商务类2、个人类3、办公类"
请输入浏览的类别"
classpersonspe;
pe.data_output(select_number);
voidadd_information(void)
(输入\'
#\'
结束)"
structinformation1*enter_link=newstructinformation1;
information_node=enter_link;
information_node->
next=NULL;
structinformation1*enter_link1=enter_link;
charch;
intrecourd=1;
stringreal_name;
cin.get(ch);
while(ch!
='
#'
)
enter_link->
next=newstructinformation1;
real_name=enter_link->
next->
pe.enter_data();
while((enter_link1!
=enter_link->
next)&
&
enter_link1!
=NULL)
if(enter_link1->
pe.return_name()==real_name)
recourd=0;
else
enter_link1=enter_link1->
next;
if(recourd==0)
errorforreenter"
recourd=1;
enter_link1=information_node;
continue;
请选择类型"
enter_link->
file_position;
enter_link=enter_link->
}enter_link->
save_input_information();
voidsave_input_information(void)
structinformation1*auxiliary_pointer=information_node->
while(auxiliary_pointer!
auxiliary_pointer->
pe.enter_file(auxiliary_pointer->
file_position);
auxiliary_pointer=auxiliary_pointer->
voidchange_information(void)
你想要浏览的类别是什么?
file_class_1();
lookfor_file(file_1);
save_to_file
(1);
file_class_2();
lookfor_file(file_2);
save_to_file
(2);
file_class_3();
lookfor_file(file_3);
change_information();
voidlookfor_file(structinformation*file_1_2_3)//到从一类文件中查找某人
请输入您要查询的名字"
stringlookfor_name;
lookfor_name;
structinformation*file_pointer=file_1_2_3;
while(file_pointer->
next!
if(file_pointer->
pe.return_name()==lookfor_name)
file_pointer->
pe.print_information();
你想修改信息还是删除信息?
1、修改2、删除"
file_pointer->
next=file_pointer->
file_pointer=file_pointer->
}}
voidvist(void)
structinformation*visit_pointer=file_1;
while(visit_pointer->
o----"
visit_pointer->
______"
visit_pointer=visit_pointer->
voidfile_class_1(void)//从commerce中输入所有的数据
ifstreaminfile("
commerce.txt"
file_1=newstructinformation;
structinformation*class_pointer=file_1;
stringstr,str1,str2,str3;
stringstreamstrstream;
while(getline(infile,str))
class_pointer->
next=newstructinformation;
strstream<
str;
strstream>
str1>
str2>
str3;
strstream.clear();
pe.enter_outer_data(str1,str2,str3);
class_pointer=class_pointer->
infile.close();
ok"
vist();
voidfile_class_2(void)//从personal中输入所有的数据
personal.txt"
file_2=newstructinformation;
structinformation*class_pointer=file_2;
voidfile_class_3(void)//从office中输入所有的数据
office.txt"
file_3=newstructinformation;
structinformation*class_pointer=file_3;
voidsave_to_file(intsave_number)
if(save_number==1)
delcommerce.txt"
structinformation*class_pointer=file_1->
while(class_pointer!
pe.enter_file
(1);
elseif(save_number==2)
delpersonal.txt"
structinformation*class_pointer1=file_2->
while(class_pointer1!
class_pointer1->
pe.enter_file
(2);
class_pointer1=class_pointer1->
deloffice.txt"
structinformation*class_pointer2=file_3->
while(class_pointer2
!
class_pointer2->
pe.enter_file(3);
class_pointer2=class_pointer2->
Zql2107.h
#ifndefZQL2107_H_INCLUDED
#defineZQL2107_H_INCLUDED
#include<
iostream>
#include<
string>
sstream>
stdlib.h>
windows.h>
fstream>
usingnamespacestd;
voidfile_class_1(void);
voidfile_class_2(void);
voidfile_class_3(void);
voidlook_information(void);
voidlookfor_file(structinformation*);
voidview_menu(void);
voidenter_to_file1(void);
voidenter_to_file2(void);
voidenter_to_file3(void);
voidsave_to_file(intsave_number);
voidselect_function(void);
voidmain_view(void);
voidbrowse(void);
voidsubmenu(void);
voidchange_information(void);
voidadd_information(void);
voidsave_input_information(void);
classpersons
public:
stringenter_data(void);
//输入一个结点信息。
voidprint_information(void);
//输出一个结点信息。
voidread_information(intfile_number);
//读一个文件类中的所有的数据。
voidenter_outer_data(stringstr1,stringstr2,stringstr3);
voiddata_enter_file(void);
voidenter_file(int);
voiddata_output(int);
stringreturn_name(void)//返回一个名字;
returnname;
stringreturn_tel(void)//返回一个电话;
returntel;
private:
stringname;
stringtel;
stringmailbox;
};
voidpersons:
:
enter_outer_data(stringstr1,stringstr2,stringstr3)//通过外来变量给name、tel、mailbox、赋值
name=str1;
tel=str2;
mailbox=str3;
print_information(void)//输出nametelmailbox
personsinformation"
name:
name<
tel:
tel<
mailbox:
mailbox<
read_information(intfile_number)//从相应的文件中读出所有的数据
fstreaminfile;
if(file_number==1)
infile.open("
commerce.dat"
if(file_number==2)
personal.dat"
office.dat"
stringstr;
name>
tel>
mailbox;
print_information();
data_enter_file(void)
请输入相应的个人信息:
name:
name;
tel:
tel;
mailbox:
;
option:
1、商务类2、个人类3、办公类"
select:
inti;
i;
ofstreamoutfile;
switch(i)
outfile.open("
ios:
app|ios:
out);
ios:
outfile<
'
outfile.close();
data_output(intfile_serial_number)
************Information***********************************"
switch(file_serial_number)
infile.open("
exit(0);
name:
tel:
pause"
//已用到的函数
stringpersons:
enter_data(void)//内部给、nametelmailbox赋值
请在下面输入对应的信息:
cin>
mailbox:
enter_file(intselect_number)
outfile.op
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- C+ 通讯 功能 管理 系统 课程设计