摘要: 实验1 #pragma once #include<iomanip> #include<iostream> #include<string> struct Contestant{ long id; std::string name; std::string major; int solved; in 阅读全文
posted @ 2025-12-23 19:57 wifi战斗机 阅读(5) 评论(1) 推荐(0)
摘要: 实验1 1 #pragma once 2 3 #include <string> 4 5 // 发行/出版物类:Publisher (抽象类) 6 class Publisher { 7 public: 8 Publisher(const std::string &name_ = ""); // 构 阅读全文
posted @ 2025-12-16 16:38 wifi战斗机 阅读(9) 评论(1) 推荐(0)
摘要: #pragma once #include <vector> #include <array> #include <string> class GradeCalc { public: GradeCalc(const std::string &cname); void input(int n); // 阅读全文
posted @ 2025-12-02 20:51 wifi战斗机 阅读(6) 评论(1) 推荐(0)
摘要: 实验一 #pragma once #include <iostream> #include <string> class Button { public: Button(const std::string &label_); const std::string& get_label() const; 阅读全文
posted @ 2025-11-26 00:09 wifi战斗机 阅读(3) 评论(1) 推荐(0)
摘要: 实验任务一 #pragma once #include <string> // 类T: 声明 class T { // 对象属性、方法 public: T(int x = 0, int y = 0); // 普通构造函数 T(const T &t); // 复制构造函数 T(T &&t); // 移 阅读全文
posted @ 2025-10-28 23:21 wifi战斗机 阅读(8) 评论(1) 推荐(0)
摘要: task1 task2 task3 task4 #include<iostream> #include<string> #include<algorithm> bool is_palindrome(const std::string& s); bool is_palindrome_ignore_ca 阅读全文
posted @ 2025-10-18 01:25 wifi战斗机 阅读(17) 评论(1) 推荐(0)
摘要: 实验4源代码 #include<stdio.h> int main() { FILE* fp; fp = fopen("d:\\data4.txt", "r"); if (fp == NULL) { printf("fail to open file.\n"); return 1; } char c 阅读全文
posted @ 2023-12-21 14:46 wifi战斗机 阅读(10) 评论(0) 推荐(0)
摘要: 实验一源代码 #include <stdio.h> #include <string.h> #define N 3 // 运行程序输入测试时,可以把这个数组改小一些输入测试 typedef struct student { int id; // 学号 char name[20]; // 姓名 cha 阅读全文
posted @ 2023-12-17 23:13 wifi战斗机 阅读(19) 评论(0) 推荐(0)
摘要: 实验一源代码 #include <stdio.h> #define N 5 void input(int x[], int n); void output(int x[], int n); void find_min_max(int x[], int n, int* pmin, int* pmax) 阅读全文
posted @ 2023-12-03 19:31 wifi战斗机 阅读(24) 评论(0) 推荐(0)
摘要: 实验一源代码 #include <stdio.h> #define N 4 void test1() { int a[N] = { 1, 9, 8, 4 }; int i; // 输出数组a占用的内存字节数 printf("sizeof(a) = %d\n", sizeof(a)); // 输出in 阅读全文
posted @ 2023-11-19 23:23 wifi战斗机 阅读(19) 评论(0) 推荐(0)