摘要: task 3 task 3_1 1 #include <iostream> 2 #include <fstream> 3 #include <array> 4 #define N 5 5 6 int main() { 7 using namespace std; 8 9 array<int, N> 阅读全文
posted @ 2022-12-07 00:06 尤夏 阅读(14) 评论(0) 推荐(0) 编辑
摘要: task 4 pets.hpp 1 #include <iostream> 2 using namespace std; 3 4 class MachinePets { 5 public: 6 MachinePets(const string s): nickname{s} {} 7 virtual 阅读全文
posted @ 2022-11-27 21:56 尤夏 阅读(16) 评论(0) 推荐(0) 编辑
摘要: 实验任务五 vectorInt.hpp 1 #include <iostream> 2 #include <cassert> 3 using namespace std; 4 5 class vectorInt { 6 7 public: 8 vectorInt(int n); 9 vectorIn 阅读全文
posted @ 2022-11-05 11:55 尤夏 阅读(24) 评论(0) 推荐(0) 编辑
摘要: 实验任务 5 info.hpp 1 #include <iostream> 2 #include <string> 3 #include <algorithm> 4 #include <vector> 5 using namespace std; 6 7 class Info{ 8 9 public 阅读全文
posted @ 2022-10-19 23:54 尤夏 阅读(16) 评论(0) 推荐(0) 编辑
摘要: 4. 实验任务4不使用C++标准库,自行设计并实现一个简化版复数类Complex Complex.hpp 1 #include <iostream> 2 #include <math.h> 3 using namespace std; 4 5 class Complex { 6 7 public: 阅读全文
posted @ 2022-10-14 16:41 尤夏 阅读(31) 评论(0) 推荐(0) 编辑
摘要: 2 实验任务二 验证性实验。使用C++语言特性中支持面向对象的语法,实现一个Point类来描述点的基础属性和操作。在C++编码环境中,输入以下代码,结合代码注释和运行结果,熟悉和掌握C++中类的定义、对象的创建和使用。 #include<iostream> using std::cout; usin 阅读全文
posted @ 2022-10-05 00:59 尤夏 阅读(12) 评论(0) 推荐(0) 编辑
摘要: https://www.cnblogs.com/youxiasaigao/ 阅读全文
posted @ 2022-09-27 19:22 尤夏 阅读(14) 评论(0) 推荐(0) 编辑