2019年6月17日
摘要: 1. // 合并两个文件内容到一个新文件中。 // 文件名均从键盘输入 #include <iostream> #include <fstream> #include <string> #include <cstdlib> using namespace std; int main() { stri 阅读全文
posted @ 2019-06-17 16:21 TOKISOKI 阅读(80) 评论(1) 推荐(0) 编辑
2019年5月31日
摘要: #ifndef MACHINEPETS_H #define MACHINEPETS_H #include <iostream> #include <string> using namespace std; class MachinePets { public: MachinePets(const s 阅读全文
posted @ 2019-05-31 21:57 TOKISOKI 阅读(81) 评论(0) 推荐(0) 编辑
2019年5月19日
摘要: 1. #ifndef BATTERY_H #define BATTERY_H class Battery { public: Battery(int batterySize0 = 70); int showBattery(); private: int batterySize; }; #endif 阅读全文
posted @ 2019-05-19 19:56 TOKISOKI 阅读(112) 评论(0) 推荐(0) 编辑
2019年4月21日
摘要: #ifndef BALL_H #define BALL_H class Ball { public: Ball(int x0=0, int y0=0); // 在坐标(x,y)处构造一个小球(小球用字符O表示) void left(int step=1); // 左移step void right( 阅读全文
posted @ 2019-04-21 21:53 TOKISOKI 阅读(120) 评论(0) 推荐(0) 编辑
2019年3月31日
摘要: 总结:在课堂上没有写void add(Complex x);void show();double mod();说明对程序还是不熟悉,做的时候还是要请教同学才能写出来。 阅读全文
posted @ 2019-03-31 19:41 TOKISOKI 阅读(117) 评论(3) 推荐(0) 编辑
2019年3月24日
摘要: 重载函数 #include <iostream> using namespace std; struct complex { double real; double imaginary; }; int add(int x1, int y1) { return x1 + y1; } double ad 阅读全文
posted @ 2019-03-24 20:52 TOKISOKI 阅读(137) 评论(2) 推荐(0) 编辑
2019年3月16日
摘要: 2-28 #include <iostream> using namespace std; int main() {char x; cout<<"Menu: A(dd) D(elete) S(ort) Q(uit),Select one:"<<endl; cin>>x; while(x) {if ( 阅读全文
posted @ 2019-03-16 19:10 TOKISOKI 阅读(116) 评论(2) 推荐(0) 编辑