会员
周边
新闻
博问
闪存
众包
赞助商
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
斍奭藇簨
博客园
首页
新随笔
联系
订阅
管理
2021年12月12日
实验五 类与多态
摘要: 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 斍奭藇簨
阅读(21)
评论(3)
推荐(0)
2021年11月28日
实验四 继承
摘要: 实验任务二 task2.cpp task2.cpp(虚函数) 总结: 1.同名覆盖原则 派生类与基类中有相同成员时:若未强行指名,则通过派生类对象使用的是派生类的同名成员; 2. 二元作用域分辨符 如果成员函数中定义了和类域中的变量同名的变量,则类域中的变量被块作用域中的变量隐藏。这时可以在变量名前
阅读全文
posted @ 2021-11-28 20:59 斍奭藇簨
阅读(53)
评论(3)
推荐(0)
2021年11月6日
实验三 类和对象II
摘要: 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 斍奭藇簨
阅读(28)
评论(3)
推荐(0)
2021年11月1日
实验二
摘要: 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 斍奭藇簨
阅读(40)
评论(4)
推荐(0)
2021年10月24日
实验一 类与对象
摘要: 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 斍奭藇簨
阅读(61)
评论(3)
推荐(0)
公告