文章分类 -  c++进阶

摘要:bind绑定器和function函数对象 bind1st和bind2nd什么时候使用 在c++ STL中提供了泛型算法 #include <iostream> #include "vector" #include <functional> //包括了函数对象 #include "algorithm" 阅读全文
posted @ 2023-01-23 13:06 satellite2002 阅读(40) 评论(0) 推荐(0) 编辑
摘要:智能指针 基础知识 智能指针的智能二字,主要体现在用户可以不关注资源的释放,因为智能指针会帮你完全管理资源的释放,它会保证无论程序逻辑怎么跑,正常执行或者产生异常,资源在到期的情况下,一定会进行释放。 C++11库里面,提供了带引用计数的智能指针和不带引用计数的智能指针,这篇文章主要介绍它们的原理和 阅读全文
posted @ 2022-11-06 22:06 satellite2002 阅读(55) 评论(0) 推荐(0) 编辑
摘要:对象被优化后c++才是高效的 对象使用过程中背后使用哪些方法 class test { public: test(int a=10) : ma(a){cout<<"test()"<<endl;} ~test(){cout<<"~test()"<<endl;} test(const test& t) 阅读全文
posted @ 2022-10-27 21:16 satellite2002 阅读(48) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示