教学文库网 - 权威文档分享云平台
您的当前位置:首页 > 文库大全 > 资格考试 >

运输企业管理信息系统设计说明书(3)

来源:网络收集 时间:2026-09-06
导读: cout car1.rdbuf() endl; car1.close(); cout endl 请在下面输入过户后的车主信息 : endl; cout endl 新车主姓名 : ; cin name; cout endl 身份证号码 : ; cin postcard; ifstream car4(carinfo.c_str()); assert(c

cout << car1.rdbuf() << endl; car1.close();

cout << endl << "请在下面输入过户后的车主信息 : " << endl; cout << endl << "新车主姓名 : "; cin >> name;

cout << endl << "身份证号码 : "; cin >> postcard;

ifstream car4(carinfo.c_str()); assert(car4); string str;

getline(car4, str); getline(car4, str); getline(car4, str);

car4 >> str >> str >> kind >> str >> str >> color >> str >> str >> no; car4.close();

carinfo = "car\\"+postcard+".txt"; ofstream car3(carinfo.c_str()); assert(car3);

面向对象课程设计,运输企业管理信息系统设计说明书

car3 << "车主姓名 : " << name << endl << endl << "身份证号 : " << postcard << endl << endl << " 车型 : " << kind << endl << endl << " 颜色 : " << color << endl << endl << " 车牌号 : " << no << endl << endl; car3.close(); }

temp << setiosflags(ios::left) << setw(20) << postcard << " " << no << endl; }

temp.close(); car.close();

if (flag) {

ofstream car2("d:\\cars.txt"); ifstream temp1("d:\\temp.txt"); car2 << temp1.rdbuf() << endl;

cout << endl << "这辆车过户完成!!!" << endl << endl; } else

cout << endl << "这辆车不存在!!!" << endl << endl; system("pause"); }

//违章登记

void manage::vioRecord() {

system("cls"); string no; string time; string place;

cout << endl << "违章登记" << endl << endl;

cout << "请根据提示输入违章车辆相关信息 : " << endl << endl; cout << "车牌号码 : "; cin >> no;

cout << endl << "违章时间 : "; cin >> time;

cout << endl << "违章地点 : "; cin >> place;

string voiInfo = "car\\"+no+".txt";

ofstream voiInfoFile(voiInfo.c_str(), ios::app); assert(voiInfoFile);

面向对象课程设计,运输企业管理信息系统设计说明书

voiInfoFile << setiosflags(ios::left) << setw(30) << time << " " << place << endl; voiInfoFile.close();

cout << endl << "违章登记完成!!!" << endl << endl; system("pause"); }

//维修信息

void manage::delet() {

string no; string name; string postcard; string no1; system("cls");

cout << endl << "旧车报废" << endl << endl; cout << "请输入你想报废的车辆的车牌号 : "; cin >> no1;

ifstream car("d:\\cars.txt"); if (!car) {

cout << endl << "对不起,这辆车不存在!!!" << endl << endl; system("pause"); }

ofstream temp("d\\temp.txt"); assert(temp); bool flag = false; bool flag1 = true;

while (car >> postcard >> no) {

if (no == no1) {

flag = true;

string carinfo = "car\\"+postcard+".txt"; ifstream carinfofile(carinfo.c_str()); assert(carinfofile);

cout << endl << "你想报废的车辆信息如下 : " << endl << endl; cout << carinfofile.rdbuf() << endl << endl; cout << "你确定要将它报废吗(y/n) : "; if (getch() == 'n') {

flag1 = false; break; }

运输企业管理信息系统设计说明书(3).doc 将本文的Word文档下载到电脑,方便复制、编辑、收藏和打印
本文链接:https://www.jiaowen.net/wenku/95808.html(转载请注明文章来源)
Copyright © 2020-2025 教文网 版权所有
声明 :本网站尊重并保护知识产权,根据《信息网络传播权保护条例》,如果我们转载的作品侵犯了您的权利,请在一个月内通知我们,我们会及时删除。
客服QQ:78024566 邮箱:78024566@qq.com
苏ICP备19068818号-2
Top
× 游客快捷下载通道(下载后可以自由复制和排版)
VIP包月下载
特价:29 元/月 原价:99元
低至 0.3 元/份 每月下载150
全站内容免费自由复制
VIP包月下载
特价:29 元/月 原价:99元
低至 0.3 元/份 每月下载150
全站内容免费自由复制
注:下载文档有可能出现无法下载或内容有问题,请联系客服协助您处理。
× 常见问题(客服时间:周一到周五 9:30-18:00)