摘要: 实验任务1 代码组织: GradeCalc.hpp 类GradeCalc声明 GradeCalc.cpp 类GradeCalc实现 demo1.cpp 测试代码 + main.cpp GradeCalc.hpp #pragma once #include <vector> #include <arr 阅读全文
posted @ 2025-12-02 23:24 bastille433 阅读(1) 评论(0) 推荐(0)
摘要: 实验任务1 代码组织: button.hpp Button类定义 window.hpp Window类定义 task1.cpp 测试模块、main button.hpp #pragma once #include <iostream> #include <string> class Button { 阅读全文
posted @ 2025-11-25 23:25 bastille433 阅读(6) 评论(4) 推荐(0)
摘要: 实验任务1 代码组织: T.h:类T的声明、友元函数声明 T.cpp:类T的实现、友元函数实现 task1.cpp:测试模块、main函数 T.h #include <string> // 类T: 声明 class T { // 对象属性、方法 public: T(int x = 0, int y 阅读全文
posted @ 2025-10-27 22:15 bastille433 阅读(9) 评论(1) 推荐(0)
摘要: 实验任务1 task1.cpp // 现代C++标准库、算法库体验 // 本例用到以下内容: // 1. 字符串string, 动态数组容器类vector、迭代器 // 2. 算法库:反转元素次序、旋转元素 // 3. 函数模板、const引用作为形参 #include <iostream> #in 阅读全文
posted @ 2025-10-17 19:08 bastille433 阅读(11) 评论(1) 推荐(0)