第一范文网 - 专业文章范例文档资料分享平台

C++程序设计车辆管理系统实验报告附源代码

来源:用户分享 时间:2025/7/17 4:19:38 本文由loading 分享 下载这篇文档手机版
说明:文章内容仅供预览,部分内容可能不全,需要完整文档或者需要复制内容,请下载word后使用。下载word有问题请添加微信号:xxxxxxx或QQ:xxxxxx 处理(尽可能给您提供完整文档),感谢您的支持与谅解。

;.

write << \ 车辆编号: \write <<\车牌号 \write << \write << \write << \write << \write << \write << \write << \车 名 : \购买日期: \生产厂家 :\行驶里程: \车辆价格 :\驾驶员的名字: \驾驶员的手机号: \write << \车型 :\

}

write.close();

cout<<\车辆信息已成功打印到同目录下

a.txt 文件中,系统间返回主界面!\

jiemian();

}

void Car::store(){

ofstream fileout(\

fileout.close(); ofstream write(\for(int i = 0; i < top; i++){

write << car[i].num << \write <

write.close();

cout<<\车辆信息保存,系统间返回主界面! \

jiemian(); }

void Car::read(){

;.'

;.

ifstream read(\while(!read.eof()){

read>>car[top].num>>car[top].pnum>>car[top].name>>car[top].time>>car[to p].made>>car[top].distance>>car[top].price>>car[top].driver>>car[top].cellp hone>>car[top].cellphone>>car[top].type;

top++; }

cout<<\读取同目录下的 b.txt read.close(); jiemian(); }

文件成功!系统将返回主界面 ...\

void Car::jiemian()

{ int n;

cout << \cout << \cout << \cout << \cout << \cout << \cout << \cout << \cout << \cout << \cout << \

欢迎进入车辆管理系统! 1- 2- 3- 4- 5- 6- 7- 8- 0-

添加车辆。 删除车辆。 查询车辆。 显示车辆。 统计车辆。 打印车辆。 读取车辆。 保存车辆。 退出系统。

*\

cout << \

**\**\**\**\**\**\**\**\**\

cout << \cout << \请输入您的操作选项: \cin >> n; switch (n) { case 1:

add(); case 2:

delet(); case 3:

search(); case 4:

show(); case 5:

sum(); case 6:

;.'

write(); case 7:

read(); case 8:

store();

case 0:

exit(0); default:

cout << \return; } }

void main() {

Car a; a.jiemian(); }

输入错误!系统将退出!;.

\

;.'

C++程序设计车辆管理系统实验报告附源代码.doc 将本文的Word文档下载到电脑,方便复制、编辑、收藏和打印
本文链接:https://www.diyifanwen.net/c5jx9d73tnd6rgfk15sw18xzko02xvg00fvn_7.html(转载请注明文章来源)
热门推荐
Copyright © 2012-2023 第一范文网 版权所有 免责声明 | 联系我们
声明 :本网站尊重并保护知识产权,根据《信息网络传播权保护条例》,如果我们转载的作品侵犯了您的权利,请在一个月内通知我们,我们会及时删除。
客服QQ:xxxxxx 邮箱:xxxxxx@qq.com
渝ICP备2023013149号
Top