摘要:
#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 阅读全文
摘要:
task4: pets.hpp #pragma once #include<iostream> #include<string> using namespace std; class MachinePets{ public: MachinePets(const string s) :nickname 阅读全文
摘要:
实验五: 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 阅读全文
摘要:
task5: info.hpp #pragma once #include<iostream>#include<string>#include<iomanip>using namespace std;class info{ public: info(string nickname,string co 阅读全文
摘要:
task1: #include <iostream>#include <complex> int main(){ using namespace std; complex<double> c1={3, 4}, c2={4.5}; const complex<double> c3{c2}; cout 阅读全文
摘要:
tastk1-1 #include <iostream>#include <string>#include <vector>int main(){ using namespace std; string s1; string s2{"c plus plus"}; string s3{s2}; str 阅读全文
摘要:
蔡雨阳 - 博客园 (cnblogs.com) 阅读全文
摘要:
一 #include <stdio.h> #define N 5 // 定义结构体类型struct student,并定义STU为其别名 typedef struct student { long no; char name[20]; int score; } STU; // 函数声明 void i 阅读全文
摘要:
任务一: #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; 阅读全文
摘要:
#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; // 用作交换两个 阅读全文