摘要: part2 // 合并两个文件内容到一个新文件中。 // 文件名均从键盘输入 #include <iostream> #include <fstream> #include <string> #include <cstdlib> using namespace std; int main() { c 阅读全文
posted @ 2019-06-16 11:04 顾少鹏 阅读(138) 评论(0) 推荐(0) 编辑
摘要: #include <iostream> #include "MachinePets.h" #include "Petcats.h" #include "Petdogs.h" using namespace std; void play(MachinePets *m){ cout<<m->getnic 阅读全文
posted @ 2019-06-03 21:14 顾少鹏 阅读(73) 评论(0) 推荐(0) 编辑
摘要: 1: #include <iostream> using namespace std; #include "arrayInt.h" int main() { // 定义动态整型数组对象a,包含2个元素,初始值为0 ArrayInt a(2); a.print(); // 定义动态整型数组对象b,包含 阅读全文
posted @ 2019-05-19 13:08 顾少鹏 阅读(98) 评论(0) 推荐(0) 编辑
摘要: 项目二:graph graph.cpp: graph.h: main.cpp: 截图: 项目三: fraction.cpp: fraction.h: main.cpp: 阅读全文
posted @ 2019-04-21 14:50 顾少鹏 阅读(130) 评论(3) 推荐(0) 编辑
摘要: #include #include using namespace std; class complex{ public: complex(double a=0,double b=0); complex(double a); complex(complex &c); void add(complex &c); ... 阅读全文
posted @ 2019-03-31 15:30 顾少鹏 阅读(431) 评论(2) 推荐(0) 编辑
摘要: 编写重载函数add(),实现对int型,double型,Complex型数据的加法。在main()函数中定义不同类型 数据,调用测试。 【运行截图】 编写实现快速排序函数模板,并在main()函数中,定义不同类型数据,调用测试。 【运行截图】 类的定义、实现和使用编程练习 设计并实现一个用户类Use 阅读全文
posted @ 2019-03-22 20:55 顾少鹏 阅读(167) 评论(2) 推荐(0) 编辑
摘要: 恢复内容开始 【实验结论】 #2-28 实现一个简单的菜单程序,运行时显示“Menu:A(dd) D(elete) S(ort) Q(uit),Selete one:”提示用户输入。A表示增加,D表示删除,S表示排序,Q表示退出。输入为A、D、S时分别提示“数据已经增加、删除、排序。”,输入Q时程序 阅读全文
posted @ 2019-03-15 22:06 顾少鹏 阅读(191) 评论(0) 推荐(0) 编辑