摘要: 四、实验结论 1.实验任务1 子任务1.2 Complex.hpp源码: 1 #ifndef COMPLEX_HPP 2 #define COMPLEX_HPP 3 4 #include<iostream> 5 6 using namespace std; 7 8 class Complex { 9 阅读全文
posted @ 2021-12-10 12:20 202083290490陈小林 阅读(34) 评论(2) 推荐(0) 编辑
摘要: 四 、实验结论 1.实验任务1 第11周限时编程练习1: 程序源码: 1 #include<iostream> 2 #include<map> 3 #include<string> 4 using namespace std; 5 6 int main() { 7 map<char,char> nu 阅读全文
posted @ 2021-11-24 21:03 202083290490陈小林 阅读(28) 评论(2) 推荐(0) 编辑
摘要: 四、实验结论 2.实验任务4 vector_int.hpp源码: 1 #ifndef VECTOR_INT 2 #define VECTOR_INT 3 4 #include<iostream> 5 #include<cassert> 6 7 using namespace std; 8 9 cla 阅读全文
posted @ 2021-11-05 17:30 202083290490陈小林 阅读(35) 评论(2) 推荐(0) 编辑
摘要: 1.实验任务1-4 1)普通数组、array、vector的相关性,以及,区别: a)数组和array的大小都是固定的,而vector的大小可以改变。 b)数组和array存储在栈中,而vector存储在堆中。 c)数组只能通过下标访问,而array和vector可以通过at函数访问。 d)数组不允 阅读全文
posted @ 2021-10-27 23:13 202083290490陈小林 阅读(47) 评论(2) 推荐(1) 编辑
摘要: task3 Complex.hpp源码: 1 #ifndef COMPLEX_HPP 2 #define COMPLEX_HPP 3 4 #include<iostream> 5 #include<cmath> 6 7 using namespace std; 8 9 class Complex { 阅读全文
posted @ 2021-10-20 17:30 202083290490陈小林 阅读(46) 评论(3) 推荐(0) 编辑