摘要: Task4: vector.hpp: #include<iostream> #include<string> #include<stdexcept> using namespace std; template <typename T> class Vector { private: T* data; 阅读全文
posted @ 2023-12-17 20:30 煙猫 阅读(19) 评论(0) 推荐(0)
摘要: Task 3:pets.hpp: #include<iostream> #include<string> using namespace std; class MachinePets{ public: MachinePets(const string s):nickname(s){} const s 阅读全文
posted @ 2023-12-03 22:08 煙猫 阅读(22) 评论(0) 推荐(0)
摘要: Task 5: textcoder.cpp: #include<iostream> #include<string> class TextCoder{ private: std::string text; void encoder(string &a){ for(int i=0;i < a.leng 阅读全文
posted @ 2023-11-30 23:02 煙猫 阅读(18) 评论(0) 推荐(0)
摘要: Task1: point.hpp: #pragma once #include <iostream> using std::cout; using std::endl; class Point { public: Point(int x0 = 0, int y0 = 0); ~Point() = d 阅读全文
posted @ 2023-11-05 22:57 煙猫 阅读(12) 评论(0) 推荐(0)
摘要: Task 3: Complex.cpp: #include <iostream> #include <cmath> class Complex{ public: Complex (double r=0,double i=0){ real = r; imag = i; } Complex (const 阅读全文
posted @ 2023-10-22 23:59 煙猫 阅读(14) 评论(0) 推荐(0)
摘要: Task 1: #include<iostream> #include<string> #include<vector> #include<array> template<typename T> void output1(const T &obj){ for (auto i: obj) std::c 阅读全文
posted @ 2023-10-19 22:47 煙猫 阅读(18) 评论(0) 推荐(0)