摘要: 1.task1 task1.cpp #pragma once #include <iostream> #include <stdexcept> // 声明 //////////////////////////////////////////////////// // 复数模板类声明 template 阅读全文
posted @ 2024-12-22 14:33 何逸雪 阅读(17) 评论(0) 推荐(0)
摘要: task3 #include <iostream> #include <vector> #include "pets.hpp" void test() { using namespace std; vector<MachinePets *> pets; pets.push_back(new PetC 阅读全文
posted @ 2024-12-08 10:53 何逸雪 阅读(14) 评论(0) 推荐(0)
摘要: 1.实验任务一 task1.1 #include <iostream> using std::cout; using std::endl; // 类A的定义 class A { public: A(int x0, int y0); void display() const; private: int 阅读全文
posted @ 2024-11-24 18:25 何逸雪 阅读(32) 评论(0) 推荐(0)
摘要: task 1 main.cpp #include "window.hpp" #include <iostream> using std::cout; using std::cin; void test() { Window w1("new window"); w1.add_button("maxim 阅读全文
posted @ 2024-11-10 18:28 何逸雪 阅读(26) 评论(0) 推荐(0)
摘要: task 1 main.cpp #include "t.h" #include <iostream> using std::cout; using std::endl; void test(); int main() { test(); cout << "\nmain: \n"; cout << " 阅读全文
posted @ 2024-10-29 19:48 何逸雪 阅读(20) 评论(0) 推荐(0)
摘要: 任务一: 代码: #include <iostream> #include <string> #include <vector> #include <algorithm> using namespace std; template<typename T> void output(const T &c 阅读全文
posted @ 2024-10-14 16:58 何逸雪 阅读(20) 评论(0) 推荐(0)
摘要: 4.任务4 #include <stdio.h> int main() { int i=0; char s; FILE *fp; fp=fopen("D:\\hhh\\data4.txt","r"); while(1){ s=fgetc(fp); if(s==EOF){ break; } else 阅读全文
posted @ 2023-12-20 17:53 何逸雪 阅读(14) 评论(0) 推荐(0)
摘要: 1.task4 #include <stdio.h> #define N 10 typedef struct { char isbn[20]; // isbn号 char name[80]; // 书名 char author[80]; // 作者 double sales_price; // 售价 阅读全文
posted @ 2023-12-17 16:46 何逸雪 阅读(13) 评论(0) 推荐(0)
摘要: 1.test1 #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); in 阅读全文
posted @ 2023-12-04 11:20 何逸雪 阅读(14) 评论(0) 推荐(0)
摘要: 1.test1 #include<stdio.h> #define N 4 void test1(){ int a[N]={1,9,8,4}; int i; printf("sizeof(a)=%d\n",sizeof(a)); for(i=0;i<N;++i) printf("%p:%d\n",& 阅读全文
posted @ 2023-11-18 14:41 何逸雪 阅读(26) 评论(0) 推荐(0)