2025年12月17日
摘要: 任务一 源代码 contestant.hpp 点我展开代码 #pragma once #include <iomanip> #include <iostream> #include <string> struct Contestant { long id; // 学号 std::string nam 阅读全文
posted @ 2025-12-17 09:34 董建标 阅读(11) 评论(1) 推荐(0)
  2025年12月10日
摘要: 任务一 源代码 publisher.hpp 点我展开代码 #pragma once #include <string> // 发行/出版物类:Publisher (抽象类) class Publisher { public: Publisher(const std::string &name_ = 阅读全文
posted @ 2025-12-10 10:03 董建标 阅读(10) 评论(1) 推荐(0)
  2025年11月26日
摘要: 任务一 源代码 GradeCalc.hpp 点我展开代码 #pragma once #include <vector> #include <array> #include <string> class GradeCalc { public: GradeCalc(const std::string & 阅读全文
posted @ 2025-11-26 11:38 董建标 阅读(20) 评论(1) 推荐(0)
  2025年11月19日
摘要: 任务一 源代码 button.hpp 点击查看代码 #pragma once #include <iostream> #include <string> class Button { public: Button(const std::string &label_); const std::stri 阅读全文
posted @ 2025-11-19 19:36 董建标 阅读(24) 评论(1) 推荐(0)
  2025年10月22日
摘要: 任务一 源代码 T.h 点击查看代码 #pragma once #include <string> // 类T: 声明 class T { // 对象属性、方法 public: T(int x = 0, int y = 0); // 普通构造函数 T(const T &t); // 复制构造函数 T 阅读全文
posted @ 2025-10-22 20:45 董建标 阅读(26) 评论(1) 推荐(0)
  2025年10月11日
摘要: 任务一 源代码 // 现代C++标准库、算法库体验 // 本例用到以下内容: // 1. 字符串string, 动态数组容器类vector、迭代器 // 2. 算法库:反转元素次序、旋转元素 // 3. 函数模板、const引用作为形参 #include <iostream> #include <s 阅读全文
posted @ 2025-10-11 12:44 董建标 阅读(33) 评论(1) 推荐(0)
  2023年12月17日
摘要: task4 1 #include <stdio.h> 2 3 int main() { 4 5 int i=0; 6 char s; 7 8 FILE *fp; 9 fp=fopen("data4.txt","r"); 10 11 while(1){ 12 s=fgetc(fp); 13 if(s= 阅读全文
posted @ 2023-12-17 10:03 董建标 阅读(30) 评论(0) 推荐(0)
  2023年12月11日
摘要: task4 1 #include <stdio.h> 2 #define N 10 3 4 typedef struct { 5 char isbn[20]; // isbn号 6 char name[80]; // 书名 7 char author[80]; // 作者 8 double sale 阅读全文
posted @ 2023-12-11 16:54 董建标 阅读(25) 评论(0) 推荐(0)
  2023年11月27日
摘要: task1.1 1 #include <stdio.h> 2 #define N 5 3 4 void input(int x[], int n); 5 void output(int x[], int n); 6 void find_min_max(int x[], int n, int *pmi 阅读全文
posted @ 2023-11-27 16:54 董建标 阅读(36) 评论(0) 推荐(0)
  2023年11月13日
摘要: task1.1 1 #include <stdio.h> 2 #define N 4 3 4 void test1() { 5 int a[N] = {1, 9, 8, 4}; 6 int i; 7 8 // 输出数组a占用的内存字节数 9 printf("sizeof(a) = %d\n", si 阅读全文
posted @ 2023-11-13 17:30 董建标 阅读(33) 评论(0) 推荐(0)