摘要: 任务1 代码组织 button.hpp Button类定义 window.hpp Window类定义 task1.cpp 测试模块 button.hpp 1 #pragma once 2 3 #include <iostream> 4 #include <string> 5 6 class Butt 阅读全文
posted @ 2026-11-26 08:16 Salt~ 阅读(8) 评论(0) 推荐(0)
摘要: 任务1: 代码组织: t.h 内容:类T的声明、友元函数声明 t.cpp 内容:类T的实现、友元函数实现 task1.cpp 内容:测试模块、main函数 t.h 1 #pragma once 2 3 #include <string> 4 5 class T { 6 public: 7 T(int 阅读全文
posted @ 2026-11-18 14:04 Salt~ 阅读(7) 评论(0) 推荐(0)
摘要: 任务1: 源代码task1.cpp: 1 // 现代C++标准库、算法库体验 2 // 本例用到以下内容: 3 // 1. 字符串string, 动态数组容器类vector、迭代器 4 // 2. 算法库:反转元素次序、旋转元素 5 // 3. 函数模板、const引用作为形参 6 7 #inclu 阅读全文
posted @ 2026-10-20 16:11 Salt~ 阅读(15) 评论(0) 推荐(0)