本文将简要介绍智能指针 shared_ptr 和 unique_ptr,并简单实现基于引用计数的智能指针。
使用智能指针的缘由
1. 考虑下边的简单代码:
1 | int main() |
本文介绍函数指针及其与回调函数联系。函数指针除了能够部分替代 C++ 中的函数模板,其更大的用处应该在于回调操作。
函数指针是指向函数调用地址的指针。
它和函数名究竟有什么关系呢?且看下文。
先请看下边程序:
1 | #include <iostream> |
本文主要对指针和引用的概念、区别以及参数传递三个方面进行阐述。
吴秦的博文C++中的指针与引用写的很经典,所以本文会部分引用,并在引用处说明。
该定义部分引用自吴秦的博文。
more >>
Learning notes on Harvard Business Review, April, 2015.
Authenticity has become the gold standard for leadership. But a view of it as a static, unwavering identity can limit you, says Ibarra. It may become an excuse for sticking with what’s comfortable and not taking on bigger challenges.
Leaders must develop an “adaptively authentic” style by experimenting with many approaches and behaviors.
more >>Authenticity means different things to different people: expressing how you really feel, being true to your values, being transparent, and so on. But we sometimes take it to mean “being as we’ve always been.” Any new and unfamiliar role calls for new and unfamiliar behavior, but anything outside our comfort zone feels inauthentic and contrived at first. We all learn by emulating our role models. It’s the only way to test new possibilities and eventually tailor them to arrive at a more authentic and impactful self.
tag:
缺失模块。
1、请确保node版本大于6.2
2、在博客根目录(注意不是yilia根目录)执行以下命令:
npm i hexo-generator-json-content --save
3、在根目录_config.yml里添加配置:
jsonContent: meta: false pages: false posts: title: true date: true path: true text: false raw: false content: false slug: false updated: false comments: false link: false permalink: false excerpt: false categories: false tags: true