2021年12月9日

摘要: 实验结论 实验1 模板类实现Complex 1 #include <iostream> 2 3 using namespace std; 4 template <typename T> 5 class Complex; 6 7 template<typename T> 8 ostream& oper 阅读全文

posted @ 2021-12-09 09:08 蒟蒻是果冻 阅读(86) 评论(3) 推荐(0) 编辑

2021年11月24日

摘要: 实验结论 实验2:验证抽象函数的使用 main.cpp 1 #include<iostream> 2 #include<typeinfo> 3 4 class Graph{ 5 public: 6 virtual void draw() { 7 std::cout << "Graph::drwa() 阅读全文

posted @ 2021-11-24 16:49 蒟蒻是果冻 阅读(51) 评论(2) 推荐(0) 编辑

2021年11月3日

摘要: 实验结论 实验五:实现Vector<int> vector_int.hpp 1 #pragma once 2 #include <iostream> 3 #include<cassert> 4 5 class Vector_int { 6 private: 7 int* arr; 8 int siz 阅读全文

posted @ 2021-11-03 17:50 蒟蒻是果冻 阅读(91) 评论(3) 推荐(1) 编辑

2021年10月29日

摘要: 实验结论 实验任务5 某独立音乐人要举办一场免费小型liveshow。livehouse场地容量有限,最多容纳100位乐迷听众。现通过某平台开通线上预约登记。线上预约登记信息类Info如下: Info.hpp 1 #pragma once 2 #include<iostream> 3 #includ 阅读全文

posted @ 2021-10-29 09:14 蒟蒻是果冻 阅读(52) 评论(3) 推荐(0) 编辑

2021年10月22日

摘要: 实验结论 实验3:自定义Complex类 Complex.hpp 1 // Complex.hpp 2 #pragma once 3 #include <iostream> 4 #include <cmath> 5 6 class Complex 7 { 8 private: 9 double re 阅读全文

posted @ 2021-10-22 19:17 蒟蒻是果冻 阅读(37) 评论(3) 推荐(0) 编辑