摘要: 实验任务1 task1.cpp: View Code 运行测试截图: 实验任务2 task2.cpp: View Code 运行测试截图: 实验任务3 task3.cpp: #include <iostream> #include <string> #include <algorithm> bool 阅读全文
posted @ 2024-10-16 00:43 陈少秋 阅读(0) 评论(0) 推荐(0) 编辑
摘要: 实验任务4 1 #pragma once 2 #include <iostream> 3 #include <stdexcept> 4 5 template <class T> 6 class Vector { 7 private: 8 T* data; 9 size_t size; 10 11 p 阅读全文
posted @ 2023-12-18 01:22 陈少秋 阅读(13) 评论(0) 推荐(0) 编辑
摘要: 实验任务5: TextCoder.hpp文件源码: 1 #ifndef TEXTCODER_HPP 2 #define TEXTCODER_HPP 3 4 #include <string> 5 6 class TextCoder { 7 private: 8 std::string text; 9 阅读全文
posted @ 2023-12-01 01:51 陈少秋 阅读(4) 评论(0) 推荐(0) 编辑
摘要: 任务1: 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 ~Poi 阅读全文
posted @ 2023-11-06 03:56 陈少秋 阅读(6) 评论(0) 推荐(0) 编辑
摘要: 任务三: 1 #ifndef T_HPP 2 #define T_HPP 3 4 #include <iostream> 5 #include <cmath> 6 7 class Complex { 8 private: 9 double real; // 实部 10 double imag; // 阅读全文
posted @ 2023-10-23 01:17 陈少秋 阅读(11) 评论(0) 推荐(0) 编辑
摘要: 实验任务1 task1.cpp: 1 // 标准库string, vector, array基础用法 2 #include <iostream> 3 #include <string> 4 #include <vector> 5 #include <array> 6 // 函数模板 7 // 对满足 阅读全文
posted @ 2023-10-19 22:32 陈少秋 阅读(9) 评论(0) 推荐(0) 编辑