摘要: Vector.hpp 1 #ifndef VECTOR_HPP 2 #define VECTOR_HPP 3 4 #include <iostream> 5 #include <stdexcept> 6 7 template<class T> 8 class Vector { 9 private: 阅读全文
posted @ 2023-12-17 12:35 神马我能行 阅读(15) 评论(0) 推荐(0)
摘要: pets.hpp 1 #ifndef PETS_HPP 2 #define PETS_HPP 3 4 #include <iostream> 5 #include <string> 6 7 class MachinePets { 8 protected: 9 std::string nickname 阅读全文
posted @ 2023-12-03 18:45 神马我能行 阅读(27) 评论(0) 推荐(0)
摘要: TextCoder.hpp 1 #include <string> 2 3 class TextCoder { 4 private: 5 std::string text; 6 7 void encoder() { 8 for (char& c : text) { 9 if (c >= 'a' && 阅读全文
posted @ 2023-11-30 09:38 神马我能行 阅读(30) 评论(0) 推荐(0)
摘要: point.hpp 1 #pragma once 2 3 #include <iostream> 4 using std::cout; 5 using std::endl; 6 7 class Point { 8 public: 9 Point(int x0 = 0, int y0 = 0); 10 阅读全文
posted @ 2023-11-05 13:04 神马我能行 阅读(31) 评论(0) 推荐(0)
摘要: task1 t.hpp 1 #pragma once 2 #include <iostream> 3 #include <string> 4 using namespace std; 5 6 class T { 7 public: 8 T(int x = 0, int y = 0); 9 T(con 阅读全文
posted @ 2023-10-22 12:09 神马我能行 阅读(39) 评论(0) 推荐(0)
摘要: task1.cpp 1 #include<iostream> 2 #include<string> 3 #include<vector> 4 #include<array> 5 6 template<typename T> 7 void output1(const T &obj){ 8 for(au 阅读全文
posted @ 2023-10-17 16:01 神马我能行 阅读(30) 评论(0) 推荐(0)