摘要: 任务1: 源代码: GradeCalc.h #pragma once #include <array> #include <vector> class GradeCalc { public: void set_grades(const std::vector<int>& grades); // 设置 阅读全文
posted @ 2026-12-06 15:45 ccmtxwbdhym 阅读(0) 评论(0) 推荐(0)
摘要: 任务1: 源代码: button.hpp #pragma once #include <iostream> #include <string> class Button { public: Button(const std::string &label); const std::string& ge 阅读全文
posted @ 2026-12-04 15:58 ccmtxwbdhym 阅读(5) 评论(0) 推荐(0)
摘要: 任务1 源代码: t.h #pragma once #include <string> class T {public: T(int x = 0, int y = 0); // 普通构造函数 T(const T &t); // 复制构造函数 T(T &&t); // 移动构造函数 ~T(); // 阅读全文
posted @ 2026-11-19 15:00 ccmtxwbdhym 阅读(3) 评论(0) 推荐(0)
摘要: 一、实验目的 体验标准库:通过使用 string,vector,algorithm 等组件,体验现代 C++ 标准库编程的便捷与高效。 组合运用:灵活组合使用现代 C++ 基础语言特性和标准库,编程解决基础问题。 培养编码素养:在编码过程中关注代码表达,提升代码的安全性、可读性和可维护性。 理解模板 阅读全文
posted @ 2026-10-20 14:35 ccmtxwbdhym 阅读(11) 评论(0) 推荐(0)
摘要: 任务1: 源代码截图: 运行结果截图: 任务2: 源代码截图: 运行结果截图: 任务3: 源代码截图: 运行结果截图: 任务4: 源代码截图: 运行结果截图: 阅读全文
posted @ 2025-10-28 18:48 ccmtxwbdhym 阅读(58) 评论(1) 推荐(0)
摘要: 任务1 源代码task1.cpp 1 // 现代C++标准库、算法库体验 2 // 功能:使用reverse/reverse_copy/rotate操作string和vector,体验标准库便捷性 3 #include <iostream> 4 #include <string> 5 #includ 阅读全文
posted @ 2025-10-17 18:00 ccmtxwbdhym 阅读(27) 评论(1) 推荐(0)