![](https://img-blog.csdnimg.cn/20201014180756724.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
C++学习
cj_who_knows
这个作者很懒,什么都没留下…
展开
-
C++远征之继承篇(笔记)
C++中的继承关系原创 2018-01-21 17:01:53 · 483 阅读 · 0 评论 -
慕课C++远征之离港篇(笔记)
一、C++引用 1、结构体中的引用 示例代码: #include using namespace std; typedef struct { int x; int y; }Coor; int main(void) { Coor c1; Coor &c = c1; c.x = 10; c.y = 20; cout return 0; } //遇到的错误:LI原创 2018-01-14 22:00:34 · 450 阅读 · 0 评论 -
C++远征之多态篇(笔记)
注:每个章节的代码均是独立的,测试时将每一节的代码复制粘贴即可 2-2、虚函数代码示例 //Shape2_2.h #ifndef SHAPE_H #define SHAPE_H #include using namespace std; class Shape { public: Shape(); ~Shape(); virtual double calcArea(原创 2018-01-24 20:51:31 · 206 阅读 · 0 评论