摘要: task1: 1 #include <iostream> 2 #include <string> 3 4 struct Contestant { 5 long id; // 学号 6 std::string name; // 姓名 7 std::string major; // 专业 8 int s 阅读全文
posted @ 2025-12-17 16:58 sunishope 阅读(10) 评论(1) 推荐(0)
摘要: task1: 1 #pragma once 2 3 #include <string> 4 5 // 发行/出版物类:Publisher (抽象类) 6 class Publisher { 7 public: 8 Publisher(const std::string &name_ = ""); / 阅读全文
posted @ 2025-12-10 23:00 sunishope 阅读(5) 评论(1) 推荐(0)
摘要: task1: 1 #pragma once 2 3 #include <vector> 4 #include <array> 5 #include <string> 6 7 class GradeCalc { 8 public: 9 GradeCalc(const std::string &cnam 阅读全文
posted @ 2025-12-01 16:20 sunishope 阅读(14) 评论(1) 推荐(0)
摘要: task1: 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::string& 阅读全文
posted @ 2025-11-22 23:39 sunishope 阅读(11) 评论(1) 推荐(0)
摘要: task1: 1 #pragma once 2 3 #include<string> 4 5 //类T声明 6 class T{ 7 public: 8 T(int x=0,int y=0);//普通构造函数 9 T(const T&t);//复制构造函数 10 T(T &&t);//移动构造函数 阅读全文
posted @ 2025-10-25 16:04 sunishope 阅读(15) 评论(1) 推荐(0)
摘要: 实验1 : 1 #include<iostream> 2 #include<string> 3 #include<vector> 4 #include<algorithm> 5 6 //模板函数声明 7 template<typename T> 8 void output(const T &c); 阅读全文
posted @ 2025-10-12 23:20 sunishope 阅读(13) 评论(1) 推荐(0)
摘要: task4 1 #include<stdio.h> 2 #include<stdlib.h> 3 #include<string.h> 4 #define N 1000 5 6 int main() { 7 char x[N]; 8 char s[N]; 9 int i=0; 10 int line 阅读全文
posted @ 2024-12-28 22:55 sunishope 阅读(31) 评论(0) 推荐(0)
摘要: 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 @ 2024-12-17 23:28 sunishope 阅读(46) 评论(0) 推荐(0)
摘要: 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* pmin, int* p 阅读全文
posted @ 2024-12-05 14:50 sunishope 阅读(44) 评论(0) 推荐(0)
摘要: task1: 1 #include<stdio.h> 2 #include<stdlib.h> 3 #define N 4 4 #define M 2 5 6 7 void test1(){ 8 int x[N]={1,9,8,4}; 9 int i; 10 11 printf("sizeof(x) 阅读全文
posted @ 2024-11-10 16:57 sunishope 阅读(52) 评论(0) 推荐(0)