
C++
Noodles--
须知参差多态,乃幸福之本源。
展开
-
c++ | 知识点1 --关于指针
在研究生面试的时候,当时还是个小白,被问及指针是什么?当时傻的不行,回答了个地址,考官没拆穿,有点小谢。 一直说指针是c的灵魂,那么什么是指针呢? 看图如下: 说明白点:指针(foo)是一个变量.这个特殊的变量的值(1776)为另一个变量(myvar)的物理地址,我们就说这个指针(foo)指向变量(myvar)。 代码理解为: myvar = 25; foo = &...原创 2020-04-21 22:45:11 · 217 阅读 · 0 评论 -
[资料库]auto_ptr, unique_ptr, shared_ptr and weak_ptr
https://www.geeksforgeeks.org/auto_ptr-unique_ptr-shared_ptr-weak_ptr-2/ perfect explaination原创 2019-12-27 21:42:49 · 150 阅读 · 0 评论 -
[资料库]inline函数选用原则
from:https://www.geeksforgeeks.org/inline-functions-cpp/ After reading many blogs ablout the inline functions ,I can only know the inline function's define and how to apply it . Untill finding this...原创 2019-12-27 17:36:03 · 285 阅读 · 0 评论 -
[索引库]oo头文件引用及forward declare
www.cplusplus.com/articles/Gw6AC542/ a blog from the cplusplus.com key words: 1.OO but not so and so' include 2.forward declare :don't include entire .h file while just using a pointer or referenc...原创 2019-12-26 21:22:44 · 178 阅读 · 0 评论 -
[索引库]指针
from:www.cplusplus.com/doc/tutorial/pointers/ perfect explain pointer and rell the diifference between & and *: pointer is a variable and eqpual to a location The reference and dereference ope...原创 2019-12-26 20:04:46 · 252 阅读 · 1 评论 -
[索引库]虚函数
索引地址:https://www.zhihu.com/question/23971699 1.虚函数 2.纯虚函数 3.抽象类 4.虚函数定义的必要性 5.C++多态的实现方式与函数重载的区别原创 2019-12-26 15:12:51 · 203 阅读 · 0 评论