摘要: 实验任务4:1.代码:vector.hpp: 1 #pragma once 2 #include <iostream> 3 #include <stdexcept> 4 using std::cout; 5 using std::endl; 6 7 template<typename T> 8 cl 阅读全文
posted @ 2023-12-13 21:32 懿里 阅读(30) 评论(0) 推荐(0)
摘要: 实验任务3: 1.代码: pets.hpp: 1 pragma once 2 3 #include<iostream> 4 #include<string> 5 using std::cout; 6 using std::cin; 7 using std::endl; 8 using std::st 阅读全文
posted @ 2023-12-03 20:13 懿里 阅读(32) 评论(0) 推荐(0)
摘要: 实验任务5:1.代码:textcoder.hpp: 1 #pragma once 2 3 #include <iostream> 4 #include <vector> 5 #include <array> 6 #include <string> 7 using namespace std; 8 9 阅读全文
posted @ 2023-11-27 22:55 懿里 阅读(30) 评论(0) 推荐(0)
摘要: 任务1: 1.代码:point.hpp: 1 #pragma once 2 3 #include <iostream> 4 using std::cout; 5 using std::endl; 6 class Point { 7 public: 8 Point(int x0 = 0, int y0 阅读全文
posted @ 2023-11-05 21:06 懿里 阅读(22) 评论(0) 推荐(0)
摘要: 任务3 1.代码 complex.hpp: 1 #ifndef complex_H 2 #define complex_H 3 4 #include <iostream> 5 #include <cmath> 6 using namespace std; 7 8 class Complex 9 { 阅读全文
posted @ 2023-10-21 12:55 懿里 阅读(37) 评论(0) 推荐(0)
摘要: 实验任务1 1.代码: 1 #include<iostream> 2 #include<string> 3 #include<vector> 4 #include<array> 5 6 7 // 函数模板 8 // 对满足特定条件的序列类型T对象,使用范围for输出 9 template<typen 阅读全文
posted @ 2023-10-16 22:23 懿里 阅读(45) 评论(0) 推荐(0)