摘要: 实验任务3 task3_1 1 #include<iostream> 2 #include<fstream> 3 #include<array> 4 #define N 5 5 6 int main() { 7 using namespace std; 8 array<int, N> x{ 97,9 阅读全文
posted @ 2022-12-04 19:25 kierborn 阅读(15) 评论(0) 推荐(0) 编辑
摘要: 实验任务4 pets.hpp 1 #pragma once 2 #include<iostream> 3 #include<string> 4 5 using namespace std; 6 using std::string; 7 class MachinePets { 8 public: 9 阅读全文
posted @ 2022-11-27 15:02 kierborn 阅读(12) 评论(0) 推荐(0) 编辑
摘要: 实验任务5 vectorInt.hpp #pragma once #include<iostream> #include<cassert> using namespace std; class vectorInt { public: vectorInt(int n); vectorInt(int n 阅读全文
posted @ 2022-11-05 21:56 kierborn 阅读(11) 评论(0) 推荐(0) 编辑
摘要: 实验任务5 Info.h #pragma once #include<iostream> #include<string> #include<iomanip> using namespace std; class Info { public: Info(){} Info(string nicknam 阅读全文
posted @ 2022-10-23 23:49 kierborn 阅读(5) 评论(0) 推荐(0) 编辑
摘要: 实验任务4 Complex.h #pragma once #include<iostream> #include<cmath> using namespace std; class Complex { public: //Complex(); Complex(double real2, double 阅读全文
posted @ 2022-10-16 20:57 kierborn 阅读(12) 评论(0) 推荐(0) 编辑
摘要: //Point类 //相较于教材,在构造函数的写法上,采用了业界更通用的初始化列表方式 #include<iostream> using std::cout; using std::endl; //定义Point类 class Point{ public: Point(int x0=0,int y0 阅读全文
posted @ 2022-09-28 23:16 kierborn 阅读(22) 评论(0) 推荐(0) 编辑