摘要: part2 #include <iostream> #include <fstream> #include <string> using namespace std; int main(){ string a; ofstream file("3.txt",ios_base::app); file<< 阅读全文
posted @ 2019-06-16 15:22 mzzzy 阅读(127) 评论(2) 推荐(0) 编辑
摘要: #include <iostream> #include <string> using namespace std; class MachinePets{ public: MachinePets(const string s):nickname(s){}; string getNickname(); 阅读全文
posted @ 2019-06-01 21:10 mzzzy 阅读(77) 评论(1) 推荐(0) 编辑
摘要: 1.car #ifndef BATTERY_H #define BATTERY_H class Battery{ public: Battery(int batterySize0=70); int show(); int batterySize; }; #endif #include "batter 阅读全文
posted @ 2019-05-19 17:07 mzzzy 阅读(101) 评论(2) 推荐(0) 编辑
摘要: graph项目: graph.h #ifndef GRAPH_H #define GRAPH_H class Graph { public: Graph(char ch,int n); void draw(); private: char symbol; int size; }; #endif gr 阅读全文
posted @ 2019-04-21 16:43 mzzzy 阅读(89) 评论(0) 推荐(0) 编辑
摘要: #include <iostream> #include <cmath> using namespace std; class Complex{ public: Complex(double real1,double imaginary1); Complex(Complex &x); Complex 阅读全文
posted @ 2019-03-31 16:31 mzzzy 阅读(128) 评论(0) 推荐(0) 编辑
摘要: 1.编写重载函数add(),实现对int型,double型,Complex型数据的加法。在main()函数中定义不同类型 数据,调用测试。 #include <iostream> using namespace std; struct complex{ double real; double ima 阅读全文
posted @ 2019-03-24 22:15 mzzzy 阅读(147) 评论(1) 推荐(0) 编辑
摘要: 2-28 (1)if...else #include <iostream> using namespace std; int main() { while (true) { char a; cout<<"Menu:A(dd) D(elete) S(ort) Q(uit),Select one:" < 阅读全文
posted @ 2019-03-17 16:17 mzzzy 阅读(144) 评论(1) 推荐(0) 编辑