2024年12月21日
摘要: 实验任务4: Vector.hpp代码: 1 #pragma once 2 #include<iostream> 3 #include<stdexcept> 4 using namespace std; 5 6 template<typename T> 7 class Vector 8 { 9 pr 阅读全文
posted @ 2024-12-21 16:28 rrrrrrrr00000 阅读(14) 评论(0) 推荐(0)
  2024年12月8日
摘要: 实验任务3: pets.hpp代码: 1 #pragma once 2 #include <iostream> 3 #include <string> 4 using std::string; 5 6 class MachinePets { 7 public: 8 // 带参数的构造函数 9 Mac 阅读全文
posted @ 2024-12-08 18:27 rrrrrrrr00000 阅读(20) 评论(0) 推荐(0)
  2024年11月24日
摘要: 实验任务2: GradeCalc.hpp代码: 1 #include <iostream> 2 #include <vector> 3 #include <string> 4 #include <algorithm> 5 #include <numeric> 6 #include <iomanip> 阅读全文
posted @ 2024-11-24 18:25 rrrrrrrr00000 阅读(34) 评论(0) 推荐(0)
  2024年11月10日
摘要: 实验任务1: botton.hpp代码: 1 #pragma once 2 3 #include <iostream> 4 #include <string> 5 6 using std::string; 7 using std::cout; 8 9 // 按钮类 10 class Button { 阅读全文
posted @ 2024-11-10 18:55 rrrrrrrr00000 阅读(24) 评论(0) 推荐(0)
  2024年10月29日
摘要: 实验任务1: t.h代码: 1 #pragma once 2 #include <string> 3 // 类T: 声明 4 class T { 5 // 对象属性、方法 6 public: 7 T(int x = 0, int y = 0); // 普通构造函数 8 T(const T &t); 阅读全文
posted @ 2024-10-29 23:36 rrrrrrrr00000 阅读(31) 评论(0) 推荐(0)
  2024年10月13日
摘要: 实验结论 1.实验任务1 代码: 1 #include <iostream> 2 #include <string> 3 #include <vector> 4 #include <algorithm> 5 6 using namespace std; 7 8 template<typename T 阅读全文
posted @ 2024-10-13 18:08 rrrrrrrr00000 阅读(17) 评论(0) 推荐(0)