摘要: 实验任务4 1 #define VECTOR_HPP 2 #include <iostream> 3 #include <stdexcept> 4 using namespace std; 5 template <typename T> 6 class Vector { 7 private: 8 T 阅读全文
posted @ 2023-12-17 08:59 春满城 阅读(22) 评论(0) 推荐(0)
摘要: 实验任务3 1 #include<iostream> 2 #include<string> 3 using namespace std; 4 class MachinePets 5 { 6 private: 7 string nickname; 8 public: 9 MachinePets(con 阅读全文
posted @ 2023-12-03 23:42 春满城 阅读(34) 评论(0) 推荐(0)
摘要: 实验任务5 1 #include <iostream> 2 #include <string> 3 using namespace std; 4 class TextCoder 5 { 6 public: 7 TextCoder() = default; 8 TextCoder(string str 阅读全文
posted @ 2023-11-30 23:43 春满城 阅读(17) 评论(0) 推荐(0)
摘要: 实验任务1 point.hpp 1 #pragma once 2 #include <iostream> 3 using std::cout; 4 using std::endl; 5 class Point 6 { 7 public: 8 Point(int x0 = 0, int y0 = 0) 阅读全文
posted @ 2023-11-06 00:57 春满城 阅读(22) 评论(0) 推荐(0)
摘要: 实验任务1 t.h 1 #ifndef T_H 2 #define T_H 3 #include <iostream> 4 #include <string> 5 using namespace std; 6 class T 7 { 8 public: 9 T(int x=0,int y=0); 1 阅读全文
posted @ 2023-10-23 01:00 春满城 阅读(26) 评论(0) 推荐(0)
摘要: 实验任务一: 1 #include <iostream> 2 #include <string> 3 #include <vector> 4 #include <array> 5 template<typename T> 6 void output1(const T &obj) 7 { 8 for( 阅读全文
posted @ 2023-10-19 23:24 春满城 阅读(14) 评论(0) 推荐(0)