摘要: 实验任务1 代码组织: contestant.hpp 结构体Contestant定义及其重载运算符函数>>和<<实现 utils.hpp 工具函数实现(排序函数、数据读/写) task1.cpp 应用代码 + main contestant.hpp #pragma once #include <io 阅读全文
posted @ 2025-12-19 11:32 bastille433 阅读(9) 评论(1) 推荐(0)
摘要: 实验任务1 代码组织: publisher.hpp 类publisher及其派生类book,film,music声明 publisher.cpp 类publisher及其派生类book,film,music实现 task1.cpp 测试模块+main publisher.hpp #pragma on 阅读全文
posted @ 2025-12-11 00:55 bastille433 阅读(13) 评论(1) 推荐(0)
摘要: 实验任务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 阅读(5) 评论(1) 推荐(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 阅读(13) 评论(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 阅读(12) 评论(1) 推荐(0)
摘要: 实验任务1 task1.cpp // 现代C++标准库、算法库体验 // 本例用到以下内容: // 1. 字符串string, 动态数组容器类vector、迭代器 // 2. 算法库:反转元素次序、旋转元素 // 3. 函数模板、const引用作为形参 #include <iostream> #in 阅读全文
posted @ 2025-10-17 19:08 bastille433 阅读(13) 评论(1) 推荐(0)