摘要:
part1 1.合并两个文件 #include <iostream> #include <fstream> #include <string> #include <cstdlib> using namespace std; int main() { string filename1, filenam 阅读全文
摘要:
设计并实现一个机器宠物类MachinePets。 #include"petcats.h" #include"petdogs.h" #include"machinepets.h" #include<iostream> #include<string> using namespace std; void 阅读全文
摘要:
1. 车辆基本信息管理 #include <iostream> using namespace std; #include "car.h" #include "electricCar.h" int main() { // 测试Car类 car oldcar("Audi", "a4", 2016); 阅读全文
摘要:
part1 Part2 #include <iostream> #include "graph.h" using namespace std; int main() { Graph graph1('*', 5); graph1.draw(); system("pause"); Graph graph 阅读全文
摘要:
#include<iostream> #include<cmath> using namespace std; class Complex { public: Complex(double real1 = 0, double imaginary1= 0); Complex(Complex &p); 阅读全文
摘要:
1.函数重载编程练习 编写重载函数add(),实现对int型,double型,Complex型数据的加法。在main()函数中定义不同类型数据,调用测试。 #include <iostream> using namespace std; struct Complex{ double real; do 阅读全文
摘要:
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') 阅读全文