摘要: 一.实验任务1 1.源代码 1 #pragma once 2 #include <iomanip> 3 #include <iostream> 4 #include <string> 5 6 struct Contestant { 7 long id; // 学号 8 std::string nam 阅读全文
posted @ 2025-12-17 09:20 flower00 阅读(18) 评论(1) 推荐(0)
摘要: 一.实验任务1 1.源代码 task1.cpp Publisher.cpp Publisher.hpp 2.运行结果截图 由于DEVC++的版本问题,我无法运行智能指针,所以将智能指针注释化 3.问题1 (1)Publisher 类包含纯虚函数,因此是抽象类。 具体依据:在 publisher.hp 阅读全文
posted @ 2025-12-10 20:39 flower00 阅读(18) 评论(1) 推荐(0)
摘要: 一.任务1 1.源代码 1 #include <algorithm> 2 #include <array> 3 #include <cstdlib> 4 #include <iomanip> 5 #include <iostream> 6 #include <numeric> 7 #include 阅读全文
posted @ 2025-11-26 23:59 flower00 阅读(38) 评论(1) 推荐(0)
摘要: 一.实验任务1 1.源代码 1 #pragma once 2 3 #include <iostream> 4 #include <string> 5 6 class Button { 7 public: 8 Button(const std::string &label_); 9 const std 阅读全文
posted @ 2025-11-20 20:57 flower00 阅读(34) 评论(1) 推荐(0)
摘要: 实验任务1: 1.源代码 1 #include "T.h" 2 #include <iostream> 3 #include <string> 4 const std::string T::doc{"a simple class sample"}; 5 const int T::max_cnt = 阅读全文
posted @ 2025-10-22 20:47 flower00 阅读(28) 评论(1) 推荐(0)
摘要: 任务1: 源代码 1 #include <iostream> 2 #include <string> 3 #include <vector> 4 #include <algorithm> 5 template<typename T> 6 void output(const T &c); 7 8 vo 阅读全文
posted @ 2025-10-12 00:05 flower00 阅读(36) 评论(1) 推荐(0)