摘要: 任务四 代码: Vector.hpp: #pragma once #include<iostream> using namespace std; template <class T> class Vector{ public: Vector(int size0):size{size0} {p=new 阅读全文
posted @ 2022-12-06 21:04 lovessr 阅读(15) 评论(0) 推荐(0) 编辑
摘要: 任务四 代码: pets.hpp: #pragma once #include<iostream> #include<string> using namespace std; class MachinePets{ public: MachinePets(const string s0):nickna 阅读全文
posted @ 2022-11-29 23:04 lovessr 阅读(10) 评论(0) 推荐(0) 编辑
摘要: 任务五 代码: vectorInt: #pragma once #include<iostream> #include<cassert> using namespace std; class VectorInt{ public: VectorInt(int s); VectorInt(int s,i 阅读全文
posted @ 2022-11-08 23:28 lovessr 阅读(18) 评论(0) 推荐(0) 编辑
摘要: 实验五 代码: info.hpp: #pragma once #include<iostream> using namespace std; class info{ public: info(string ni="",string co="",string ci="",int n0=0):nickn 阅读全文
posted @ 2022-10-25 23:20 lovessr 阅读(10) 评论(0) 推荐(0) 编辑
摘要: 实验二任务四 代码: Complex.hpp: #pragma once #include<iostream> #include"math.h" using namespace std; class Complex{ public: Complex(double r = 0.0,double i = 阅读全文
posted @ 2022-10-18 16:42 lovessr 阅读(20) 评论(0) 推荐(0) 编辑
摘要: 实验二: 代码如下: #include<iostream> using namespace std; class Point{ public: Point(int x0 = 0, int y0 = 0); Point(const Point &p); ~Point()=default; int ge 阅读全文
posted @ 2022-10-03 17:35 lovessr 阅读(8) 评论(0) 推荐(0) 编辑