摘要: #实验六 task4 vector.hpp #pragma once #include<iostream> using namespace std; template<typename T> class Vector { public: Vector() {}; Vector(int n) :siz 阅读全文
posted @ 2022-12-07 08:27 丁佳杰 阅读(8) 评论(0) 推荐(0) 编辑
摘要: #实验任务四 task4.cpp #include <iostream> #include "pets.hpp" void play(MachinePets& obj) { std::cout << obj.get_nickname() << " says " << obj.talk() << st 阅读全文
posted @ 2022-11-30 00:33 丁佳杰 阅读(15) 评论(0) 推荐(0) 编辑
摘要: #实验任务五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 19:37 丁佳杰 阅读(7) 评论(0) 推荐(0) 编辑
摘要: #实验任务五cpp #include <iostream> #include <string> #include <vector> #include <iomanip> #include "info.hpp" using namespace std; int main() { const int c 阅读全文
posted @ 2022-10-25 02:59 丁佳杰 阅读(4) 评论(0) 推荐(0) 编辑
摘要: Task 4 hpp文件如下 #pragma once #include<iostream> #include<cmath> using namespace std; class Complex { public: Complex(double a = 0, double b = 0) :real{ 阅读全文
posted @ 2022-10-19 01:09 丁佳杰 阅读(5) 评论(0) 推荐(0) 编辑
摘要: 实验任务一 #include<iostream> #include<string> #include<vector> int main() { using namespace std; string s1; string s2{ "c plus plus" }; string s3{ s2 }; s 阅读全文
posted @ 2022-10-05 12:48 丁佳杰 阅读(5) 评论(0) 推荐(0) 编辑