摘要: 1 #ifndef PERSON_HPP 2 #define PERSON_HPP 3 #include <iostream> 4 #include <iomanip> 5 #include <string> 6 7 using namespace std; 8 9 class Person 10 阅读全文
posted @ 2021-12-12 12:26 斍奭藇簨 阅读(16) 评论(3) 推荐(0) 编辑
摘要: 实验任务二 task2.cpp task2.cpp(虚函数) 总结: 1.同名覆盖原则 派生类与基类中有相同成员时:若未强行指名,则通过派生类对象使用的是派生类的同名成员; 2. 二元作用域分辨符 如果成员函数中定义了和类域中的变量同名的变量,则类域中的变量被块作用域中的变量隐藏。这时可以在变量名前 阅读全文
posted @ 2021-11-28 20:59 斍奭藇簨 阅读(35) 评论(3) 推荐(0) 编辑
摘要: task4.hpp 1 #ifndef VECTOR_INT_HPP 2 #define VERTOR_INT_HPP 3 4 #include <iostream> 5 #include <cassert> 6 7 using namespace std; 8 9 class Vector_int 阅读全文
posted @ 2021-11-06 22:57 斍奭藇簨 阅读(14) 评论(3) 推荐(0) 编辑
摘要: text5.hpp 1 #ifndef INFO_HPP 2 #define INFO_HPP 3 #include <iostream> 4 #include <string> 5 6 using namespace std; 7 8 class info 9 { 10 public: 11 in 阅读全文
posted @ 2021-11-01 19:20 斍奭藇簨 阅读(17) 评论(4) 推荐(0) 编辑
摘要: 1 #ifndef COMPLEX_HPP 2 #define COMPLEX_HPP 3 4 #include<iostream> 5 #include<cmath> 6 7 using namespace std; 8 9 class Complex 10 { 11 private: 12 do 阅读全文
posted @ 2021-10-24 23:38 斍奭藇簨 阅读(48) 评论(3) 推荐(0) 编辑