摘要: 实验代码 实验任务4 .hpp #include<iostream>#include<stdexcept>#include <cassert>using namespace std;template<typename T>class Vector{private: T* ptr; int size; 阅读全文
posted @ 2023-12-17 19:59 笨死你得了 阅读(17) 评论(0) 推荐(0)
摘要: 实验任务3 .hpp #include <iostream>using std::string;class MachinePets { private: string nickname; public: MachinePets(const string s); string get_nickname 阅读全文
posted @ 2023-12-03 23:56 笨死你得了 阅读(16) 评论(0) 推荐(0)
摘要: 实验任务5 实验代码: textcoder.hpp #pragma once #include <iostream>#include <vector>#include <array>#include <string>using namespace std; class TextCoder{ priv 阅读全文
posted @ 2023-11-30 19:45 笨死你得了 阅读(42) 评论(0) 推荐(0)
摘要: 任务1 point.hpp #pragma once #include <iostream>using std::cout;using std::endl; class Point {public: Point(int x0 = 0, int y0 = 0); ~Point() = default; 阅读全文
posted @ 2023-11-05 22:58 笨死你得了 阅读(25) 评论(0) 推荐(0)
摘要: 任务三: complex.hpp代码: # include<iostream># include<cmath> class Complex{public:Complex(double r = 0, double i = 0){real = r;imag = i;};Complex(const Com 阅读全文
posted @ 2023-10-22 21:34 笨死你得了 阅读(29) 评论(0) 推荐(0)
摘要: 实验任务1 #include <iostream> #include <string> #include <vector> #include <array>template<typename T> void output1(const T &obj) { for(auto i: obj) std:: 阅读全文
posted @ 2023-10-19 21:12 笨死你得了 阅读(17) 评论(0) 推荐(0)