摘要: task4 Vector.cpp #pragma once using namespace std; template <typename T> class Vector{ public: Vector(int n); Vector(int n, T v); ~Vector(); Vector(co 阅读全文
posted @ 2022-12-04 15:50 费远航 阅读(10) 评论(0) 推荐(0) 编辑
摘要: task4 #pragma once #include<iostream> using namespace std; class MachinePets { public: MachinePets(const string s) :nickname(s){} string get_nickname( 阅读全文
posted @ 2022-11-29 19:54 费远航 阅读(10) 评论(0) 推荐(0) 编辑
摘要: task5.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-07 12:55 费远航 阅读(14) 评论(0) 推荐(0) 编辑
摘要: task5.cpp #include<iostream> #include<string> #include<vector> #include"info.hpp" using namespace std; int main() { const int capacity = 100; vector<i 阅读全文
posted @ 2022-10-25 17:18 费远航 阅读(13) 评论(0) 推荐(0) 编辑
摘要: task4.cpp #include "Complex.hpp" #include <iostream> void test() { using namespace std; Complex c1(3, -4); const Complex c2(4.5); Complex c3(c1); cout 阅读全文
posted @ 2022-10-19 14:33 费远航 阅读(3) 评论(0) 推荐(0) 编辑
摘要: #include <iostream> using std::cout; using std::endl; class Point { public: Point(int x0 = 0, int y0 = 0); Point(const Point&p ); ~Point() = default; 阅读全文
posted @ 2022-10-04 23:20 费远航 阅读(30) 评论(0) 推荐(0) 编辑