摘要: part1 1.合并两个文件 #include <iostream> #include <fstream> #include <string> #include <cstdlib> using namespace std; int main() { string filename1, filenam 阅读全文
posted @ 2019-06-17 19:53 星星会打烊 阅读(168) 评论(0) 推荐(0) 编辑
摘要: 设计并实现一个机器宠物类MachinePets。 #include"petcats.h" #include"petdogs.h" #include"machinepets.h" #include<iostream> #include<string> using namespace std; void 阅读全文
posted @ 2019-06-03 12:27 星星会打烊 阅读(119) 评论(0) 推荐(0) 编辑
摘要: 1. 车辆基本信息管理 #include <iostream> using namespace std; #include "car.h" #include "electricCar.h" int main() { // 测试Car类 car oldcar("Audi", "a4", 2016); 阅读全文
posted @ 2019-05-20 23:50 星星会打烊 阅读(192) 评论(1) 推荐(0) 编辑
摘要: part1 Part2 #include <iostream> #include "graph.h" using namespace std; int main() { Graph graph1('*', 5); graph1.draw(); system("pause"); Graph graph 阅读全文
posted @ 2019-04-23 22:45 星星会打烊 阅读(170) 评论(0) 推荐(0) 编辑
摘要: #include<iostream> #include<cmath> using namespace std; class Complex { public: Complex(double real1 = 0, double imaginary1= 0); Complex(Complex &p); 阅读全文
posted @ 2019-04-01 00:02 星星会打烊 阅读(175) 评论(1) 推荐(0) 编辑
摘要: 1.函数重载编程练习 编写重载函数add(),实现对int型,double型,Complex型数据的加法。在main()函数中定义不同类型数据,调用测试。 #include <iostream> using namespace std; struct Complex{ double real; do 阅读全文
posted @ 2019-03-26 00:04 星星会打烊 阅读(240) 评论(1) 推荐(0) 编辑
摘要: 2-28-1 #include<iostream> using namespace std; int main() {char r; cout<<"Menu:A(dd) D(elete) S(ort) Q(uit),Select one:"<<endl; cin>>r; while(r!='Q') 阅读全文
posted @ 2019-03-17 00:01 星星会打烊 阅读(134) 评论(2) 推荐(0) 编辑