摘要:
task4.hpp #include<iostream> #include<stdexcept> #include <cassert> using namespace std; template<typename T> class Vector { private: T* ptr; int size 阅读全文
摘要:
1. .hpp #pragma once #include <iostream> using std::cout; using std::endl; class Point { public: Point(int x0 = 0, int y0 = 0); ~Point() = default; in 阅读全文
摘要:
task.3 .hpp #pragma once #include<iostream> #include<cmath> class Complex{ public : Complex(double r=0,double i=0){ real=r;imag=i ;} Complex(const Com 阅读全文
摘要:
#include<iostream> #include<string> #include<vector> #include<array> // 函数模板 // 对满足特定条件的序列类型T对象,使用范围for输出 template<typename T> void output1(const T &o 阅读全文
摘要:
#include <iostream> #include "Vector.hpp" void test() { using namespace std; int n; cin >> n; Vector<double> x1(n); for(auto i = 0; i < n; ++i) x1.at( 阅读全文
摘要:
#pragma once #include<iostream> #include<string> using namespace std; class MachinePets{ private: string nickname; public: MachinePets(const string &s 阅读全文
摘要:
#pragma once #include<iostream> using namespace std; class vectorInt { public: vectorInt(int n); vectorInt(int n, int value); vectorInt(const vectorIn 阅读全文
摘要:
info.hpp#pragma once #include<iostream> #include<string> using namespace std; class Info { public: Info(string nn, string cont, string ct,int x); void 阅读全文
摘要:
task.4 #include<iostream> #include<math.h> using namespace std; class Complex { private: float real, imag; public: Complex(float r, float i);//带两个参数的构 阅读全文
摘要:
实验 2 #include<iostream> using namespace std; class point {public: point(int x0= 0,int y0=0); point(const point&p); ~point()=default; int get_x() const 阅读全文