摘要: 实验任务3 task3_1.cpp 1 #include<iostream> 2 #include<vector> 3 template<typename T> 4 void output(const T&obj){ 5 for(auto &item:obj) 6 std::cout<<item<< 阅读全文
posted @ 2022-11-30 23:27 曹文杰202183290470 阅读(39) 评论(0) 推荐(0) 编辑
摘要: 实验任务4 pets.hpp 1 #pragma once 2 #include<iostream> 3 #include<iomanip> 4 #include<string> 5 using namespace std; 6 class MachinePets{ 7 public: 8 Mach 阅读全文
posted @ 2022-11-24 21:06 曹文杰202183290470 阅读(39) 评论(0) 推荐(0) 编辑
摘要: 实验任务5 vectorInt.hpp 1 #pragma once 2 #include<iostream> 3 using namespace std; 4 class vectorInt{ 5 public: 6 vectorInt(int n); 7 vectorInt(int n,int 阅读全文
posted @ 2022-11-02 21:47 曹文杰202183290470 阅读(28) 评论(0) 推荐(0) 编辑
摘要: 实验任务5 task5.cpp 1 #include<iostream> 2 #include<vector> 3 #include<string> 4 #include"Info.hpp" 5 using namespace std; 6 int main() 7 { 8 const int ca 阅读全文
posted @ 2022-10-19 20:05 曹文杰202183290470 阅读(34) 评论(0) 推荐(0) 编辑
摘要: 4. 实验任务4 不使用C++标准库,自行设计并实现一个简化版复数类Complex Complex.hpp #include<iostream> #include<cmath> using namespace std; class Complex{ public: Complex(double a= 阅读全文
posted @ 2022-10-13 21:58 曹文杰202183290470 阅读(30) 评论(0) 推荐(0) 编辑
摘要: 实验任务2 #include<iostream> using std::cout; using std::endl; class Point{ public: Point(int x0=0,int y0=0); Point(const Point&p); ~Point()=default; int 阅读全文
posted @ 2022-09-28 18:59 曹文杰202183290470 阅读(31) 评论(0) 推荐(0) 编辑
摘要: https://www.cnblogs.com/cwj202183290470/ 阅读全文
posted @ 2022-09-26 22:31 曹文杰202183290470 阅读(16) 评论(1) 推荐(0) 编辑