摘要: 实验任务3 task3_1.cpp源码: 1 #include <iostream> 2 #include <fstream> 3 #include <array> 4 #define N 5 5 int main() { 6 using namespace std; 7 array<int, N> 阅读全文
posted @ 2022-11-30 23:13 段彦博 阅读(11) 评论(0) 推荐(0) 编辑
摘要: 实验任务4 pets.hpp源码: 1 #include<iostream> 2 #include<string> 3 using namespace std; 4 class MachinePets{ 5 private: 6 string nickname; 7 public: 8 Machin 阅读全文
posted @ 2022-11-24 19:04 段彦博 阅读(13) 评论(0) 推荐(0) 编辑
摘要: 实验任务五: vectorInt.hpp: 1 #include <iostream> 2 #include <cassert> 3 using namespace std; 4 class vectorInt { 5 public: 6 vectorInt(int n); 7 vectorInt( 阅读全文
posted @ 2022-11-03 17:52 段彦博 阅读(2) 评论(0) 推荐(0) 编辑
摘要: 实验任务5: Info.hpp文件源码: 1 #include<iostream> 2 #include<vector> 3 #include<string> 4 using namespace std; 5 class info { 6 private: 7 string nickname; 8 阅读全文
posted @ 2022-10-19 20:31 段彦博 阅读(20) 评论(0) 推荐(0) 编辑
摘要: 实验任务4 Complex.hpp文件源码: 1 #include<iostream> 2 #include<math.h> 3 using namespace std; 4 class Complex { 5 public: 6 Complex(double r=0.0,double i=0.0) 阅读全文
posted @ 2022-10-12 22:35 段彦博 阅读(16) 评论(0) 推荐(0) 编辑
摘要: 实验任务2 源代码: 1 #include <iostream> 2 using std::cout; 3 using std::endl; 4 5 class Point 6 { 7 public: 8 Point(int x0 = 0, int y0 = 0); 9 Point(const Po 阅读全文
posted @ 2022-09-28 19:37 段彦博 阅读(2) 评论(0) 推荐(0) 编辑