摘要: 实验任务2 Person.hpp #include<iostream> #include<string> using namespace std; class Person{ public: Person(){}; Person(string a,string b,string c=" "):nam 阅读全文
posted @ 2021-12-15 14:34 qiujin 阅读(8) 评论(3) 推荐(0) 编辑
摘要: 实验任务2: 修改前task2.cpp: #include <iostream> #include <typeinfo> // definitation of Graph class Graph { public: void draw() { std::cout << "Graph::draw() 阅读全文
posted @ 2021-11-26 11:40 qiujin 阅读(7) 评论(2) 推荐(0) 编辑
摘要: 四、实验结论 1.实验任务1-3 验证性实验。 2.实验任务4 vector_int.hpp #include<iostream> using namespace std; class Vector_int{ public: Vector_int(int n); Vector_int(int n,i 阅读全文
posted @ 2021-11-07 11:36 qiujin 阅读(9) 评论(2) 推荐(0) 编辑
摘要: 实验任务五: info.hpp #include<string> #include <iostream> using namespace std; class Info{ public: Info(string name="xxx",string contact="xxx",string city= 阅读全文
posted @ 2021-11-05 12:47 qiujin 阅读(101) 评论(2) 推荐(0) 编辑
摘要: 实验结论 实验任务三: Comple.hpp 源码: using namespace std; #include<iostream> class Complex { public: Complex(double r = 3, double i = 0) :real(r), imag(i) {}; C 阅读全文
posted @ 2021-10-23 13:51 qiujin 阅读(30) 评论(2) 推荐(0) 编辑