摘要: 实验任务1 GradeCalc.hpp #pragma once #include <vector> #include <array> #include <string> class Gradecalc { public: Gradecalc(const std::string &cname); v 阅读全文
posted @ 2025-12-03 00:26 15468483 阅读(1) 评论(0) 推荐(0)
摘要: 实验任务1 window.hpp #pragma once #include <iostream> #include <vector> #include <algorithm> #include "button.hpp" // 窗口类 class Window{ public: Window(con 阅读全文
posted @ 2025-11-26 00:56 15468483 阅读(4) 评论(1) 推荐(0)
摘要: 实验任务1 T.h源码 #pragma once #include <string> // 类T: 声明 class T { // 对象属性、方法 public: T(int x = 0, int y = 0); // 普通构造函数 T(const T &t); // 复制构造函数 T(T &&t) 阅读全文
posted @ 2025-10-29 01:16 15468483 阅读(5) 评论(1) 推荐(0)
摘要: 任务一 代码: // 现代C++标准库、算法库体验 // 本例用到以下内容: // 1. 字符串string, 动态数组容器类vector、迭代器 // 2. 算法库:反转元素次序、旋转元素 // 3. 函数模板、const引用作为形参 #include <iostream> #include <s 阅读全文
posted @ 2025-10-17 23:52 15468483 阅读(8) 评论(1) 推荐(0)
摘要: 任务1 task1 #include "Complex.hpp" #include <iostream> #include <fstream> #include <stdexcept> // 测试1:复数模板类测试 void test1() { using namespace std; Comple 阅读全文
posted @ 2023-12-17 21:57 15468483 阅读(8) 评论(0) 推荐(0)
摘要: 任务3 pets #include <iostream> #include <string> #pragma once using namespace std; class MachinePets { private: string nickname; public: MachinePets(con 阅读全文
posted @ 2023-12-04 00:17 15468483 阅读(8) 评论(0) 推荐(0)
摘要: 任务5 Textcoder #include<iostream> #include<string> using namespace std; class Textcoder { public: Textcoder(string t); string get_ciphertext(); string 阅读全文
posted @ 2023-11-30 15:10 15468483 阅读(14) 评论(0) 推荐(0)
摘要: 任务1 #ifndef T_H #define T_H #include <iostream> #include <string> using namespace std; class T { public: T(int x = 0, int y = 0); T(const T &t); T(T & 阅读全文
posted @ 2023-10-22 23:33 15468483 阅读(13) 评论(0) 推荐(0)
摘要: 任务1 //标准库string,vector,array基础用法 #include<iostream> #include<string> #include<vector> #include<array> //函数模板 //对满足特定条件的序列类型T对象,使用范围for输出 template<type 阅读全文
posted @ 2023-10-19 23:38 15468483 阅读(15) 评论(0) 推荐(0)
摘要: 4 #define _CRT_SECURE_NO_WARNINGS #include<stdio.h> int main() { FILE* fp; fp = fopen("D:\\.temp\\data4.txt", "r"); if (feof(fp)) { printf("fail to op 阅读全文
posted @ 2022-12-27 22:54 15468483 阅读(21) 评论(0) 推荐(0)