摘要: task4 vector.hpp #include <iostream> #include <stdexcept> using namespace std; template <typename T> class Vector { private: T* data; int size; public 阅读全文
posted @ 2023-12-17 17:04 PerfectAllKill 阅读(12) 评论(0) 推荐(0)
摘要: task3 machinepets.hpp #include<iostream> #include<string> using namespace std; class MachinePets { public: MachinePets(const string s); MachinePets(); 阅读全文
posted @ 2023-12-03 22:33 PerfectAllKill 阅读(14) 评论(0) 推荐(0)
摘要: task5 textcoder.hpp #include<iostream> #include<string> using std::string; class TextCoder { private: string text; void encoder(); void decoder(); pub 阅读全文
posted @ 2023-11-29 21:47 PerfectAllKill 阅读(23) 评论(0) 推荐(0)
摘要: task1 point.hpp #pragma once #include<iostream> using std::cout; using std::endl; class Point { public: Point(int x0=0, int y0=0); ~Point()=default; i 阅读全文
posted @ 2023-11-05 20:16 PerfectAllKill 阅读(13) 评论(0) 推荐(0)
摘要: task1.cpp 方式一 t.h #ifndef T_H #define T_H #include <iostream> #include <string> using namespace std; class T { public: T(int x = 0, int y = 0); T(cons 阅读全文
posted @ 2023-10-22 16:14 PerfectAllKill 阅读(36) 评论(0) 推荐(0)
摘要: task1.cpp #include<iostream>#include<string>#include<vector>#include<array> template<typename T>void output1(const T&obj){ for(auto i :obj) std::cout< 阅读全文
posted @ 2023-10-17 23:04 PerfectAllKill 阅读(30) 评论(0) 推荐(0)