摘要: Part1+Part2 // 合并两个文件内容到一个新文件中。 // 文件名均从键盘输入 #include <iostream> #include <fstream> #include <string> #include <cstdlib> using namespace std; int main 阅读全文
posted @ 2019-06-17 13:46 黎黎0202 阅读(121) 评论(0) 推荐(0) 编辑
摘要: #include <iostream> #include "MachinePets.h" #include "PetCats.h" #include "PetDogs.h" #include <string> using namespace std; void play(MachinePets *p 阅读全文
posted @ 2019-06-01 18:44 黎黎0202 阅读(124) 评论(0) 推荐(0) 编辑
摘要: #include <iostream> using namespace std; #include "car.h" #include "ElectricCar.h" int main() { // 测试Car类 Car oldcar("Audi","a4",2016); cout << " oldc 阅读全文
posted @ 2019-05-19 21:44 黎黎0202 阅读(147) 评论(0) 推荐(0) 编辑
摘要: Part2 #ifndef GRAPH_H #define GRAPH_H // 类Graph的声明 class Graph { public: Graph(char ch, int n); // 带有参数的构造函数 void draw(); // 绘制图形 private: char symbol 阅读全文
posted @ 2019-04-21 17:43 黎黎0202 阅读(138) 评论(0) 推荐(0) 编辑
摘要: #include <iostream> #include <cmath> using namespace std; class Complex { public: Complex(double x,double y); Complex(double z); Complex(Complex &p); 阅读全文
posted @ 2019-03-31 15:54 黎黎0202 阅读(147) 评论(0) 推荐(0) 编辑
摘要: 实验结论 1.函数重载编程练习 #include <iostream> using namespace std; struct complex { double real; double imaginary; }; int add(int a,int b); double add(double x, 阅读全文
posted @ 2019-03-24 22:41 黎黎0202 阅读(153) 评论(1) 推荐(0) 编辑
摘要: 2-28-1 #include <iostream> using namespace std; int main() { char m; cout<<"Menu:A(dd) D(elete) S(ort) Q(uit),Select one:"<<endl; cin>>m; while(m!='Q' 阅读全文
posted @ 2019-03-17 15:54 黎黎0202 阅读(143) 评论(1) 推荐(0) 编辑