摘要: 任务一:源代码: 1 #include <iostream> 2 #include <string> 3 #include "GradeCalc.hpp" 4 5 void test() { 6 GradeCalc c1("OOP"); 7 8 std::cout << "录入成绩:\n"; 9 c 阅读全文
posted @ 2025-12-02 19:26 yyzbh 阅读(3) 评论(0) 推荐(0)
摘要: 任务一 源代码 1 #include "window.hpp" 2 #include <iostream> 3 4 void test(){ 5 Window w("Demo"); 6 w.add_button("add"); 7 w.add_button("remove"); 8 w.add_bu 阅读全文
posted @ 2025-11-25 21:25 yyzbh 阅读(15) 评论(1) 推荐(0)
摘要: 任务1: 源代码: 1 #pragma once 2 #include <string> 3 // 类T: 声明 4 class T { 5 // 对象属性、方法 6 public: 7 T(int x = 0, int y = 0); // 普通构造函数 8 T(const T &t); // 复 阅读全文
posted @ 2025-10-27 21:07 yyzbh 阅读(15) 评论(1) 推荐(0)
摘要: 任务1 源代码 1 #include<iostream> 2 #include<string> 3 #include<vector> 4 #include<algorithm> 5 6 template<typename T> 7 void output(const T &C); 8 9 void 阅读全文
posted @ 2025-10-15 17:32 yyzbh 阅读(19) 评论(1) 推荐(0)