摘要: 实验任务4 Vector.hpp 1 #pragma once 2 3 #include <iostream> 4 #include <stdexcept> 5 6 using namespace std; 7 8 template <typename T> 9 10 class Vector { 阅读全文
posted @ 2023-12-16 18:30 rssn 阅读(14) 评论(0) 推荐(0) 编辑
摘要: 实验任务3 pets.hpp 1 #pragma once 2 3 #include <iostream> 4 #include <string> 5 6 using std::cout; 7 using std::endl; 8 using std::string; 9 10 class Mach 阅读全文
posted @ 2023-12-03 21:09 rssn 阅读(12) 评论(0) 推荐(0) 编辑
摘要: 实验任务5 TextCoder.hpp 1 #pragma once 2 3 #include <iostream> 4 #include <string> 5 6 using namespace std; 7 8 class TextCoder { 9 private: 10 string tex 阅读全文
posted @ 2023-11-28 20:10 rssn 阅读(16) 评论(0) 推荐(0) 编辑
摘要: 实验任务1 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 = 阅读全文
posted @ 2023-11-04 11:33 rssn 阅读(22) 评论(0) 推荐(0) 编辑
摘要: 实验任务1 方式1 main.cpp 1 #include "t.h" 2 3 // 测试 4 void test() { 5 cout << "T class info: " << T::doc << endl; 6 cout << "T objects max_count: " << T::ma 阅读全文
posted @ 2023-10-23 09:59 rssn 阅读(14) 评论(0) 推荐(0) 编辑
摘要: 实验任务1 task1.cpp 1 // 标准库string,vector,array基础用法 2 3 #include <iostream> 4 #include <string> 5 #include <vector> 6 #include <array> 7 8 //函数模板 9 //对满足特 阅读全文
posted @ 2023-10-18 15:41 rssn 阅读(31) 评论(0) 推荐(0) 编辑