摘要: #pragma once #include<iostream> using std::cout; using std::endl; template<typename T> class Vector { public: Vector(T n) :size(n) { p = new T[n]; } V 阅读全文
posted @ 2022-12-06 22:10 要比我快乐 阅读(8) 评论(0) 推荐(0) 编辑
摘要: task4: pets.hpp #pragma once #include<iostream> #include<string> using namespace std; class MachinePets{ public: MachinePets(const string s) :nickname 阅读全文
posted @ 2022-11-29 21:29 要比我快乐 阅读(5) 评论(0) 推荐(0) 编辑
摘要: 实验五: task 5.cpp #include <iostream>#include "vectorInt.hpp" void test() { using namespace std; int n; cin >> n; vectorInt x1(n); for(auto i = 0; i < n 阅读全文
posted @ 2022-11-08 20:51 要比我快乐 阅读(13) 评论(0) 推荐(0) 编辑
摘要: task5: info.hpp #pragma once #include<iostream>#include<string>#include<iomanip>using namespace std;class info{ public: info(string nickname,string co 阅读全文
posted @ 2022-10-20 22:04 要比我快乐 阅读(28) 评论(0) 推荐(0) 编辑
摘要: task1: #include <iostream>#include <complex> int main(){ using namespace std; complex<double> c1={3, 4}, c2={4.5}; const complex<double> c3{c2}; cout 阅读全文
posted @ 2022-10-17 22:39 要比我快乐 阅读(19) 评论(0) 推荐(0) 编辑
摘要: tastk1-1 #include <iostream>#include <string>#include <vector>int main(){ using namespace std; string s1; string s2{"c plus plus"}; string s3{s2}; str 阅读全文
posted @ 2022-10-04 21:33 要比我快乐 阅读(5) 评论(0) 推荐(0) 编辑
摘要: 蔡雨阳 - 博客园 (cnblogs.com) 阅读全文
posted @ 2022-09-26 11:39 要比我快乐 阅读(19) 评论(0) 推荐(0) 编辑
摘要: 一 #include <stdio.h> #define N 5 // 定义结构体类型struct student,并定义STU为其别名 typedef struct student { long no; char name[20]; int score; } STU; // 函数声明 void i 阅读全文
posted @ 2021-12-28 14:09 要比我快乐 阅读(24) 评论(1) 推荐(0) 编辑
摘要: 任务一: #include <stdio.h> #define N 5 int binarySearch(int *x, int n, int item); // 函数声明 int main() { int a[N] = {2, 7, 19, 45, 66}; int i, index, key; 阅读全文
posted @ 2021-12-22 00:41 要比我快乐 阅读(16) 评论(1) 推荐(0) 编辑
摘要: #include <stdio.h> #define N 5 void output(int x[], int n); int main() { int x[N] = {9, 55, 30, 27, 22}; int i; int k; // 用于记录最大元素的下标 int t; // 用作交换两个 阅读全文
posted @ 2021-12-15 00:08 要比我快乐 阅读(5) 评论(1) 推荐(0) 编辑