随笔分类 - C++
记录C++学习笔记和心得
摘要:首先看如下帖子了解对象中成员及虚函数表的内存布局: https://blog.csdn.net/ljianhui/article/details/46408645 再通过内存布局计算类的大小: https://blog.csdn.net/fengxinlinux/article/details/72
阅读全文
摘要:头文件:#inlcude<memory> 智能指针类型: auto_ptr (C++98)弃用 shared_ptr, unique_ptr ,weak_ptr (C++11) 指针的初始化函数:make_shared(C++11),make_unique (C++14),返回bool 以上均位于n
阅读全文
摘要:头文件:#include<string> 缩写: NBTS(null-terminated string):表示以空字符串结尾的C风格字符串; string::nops:表示string字符串的结尾,一般为unsigned int的最大值; 构造函数: 1. string one("abcd");
阅读全文

浙公网安备 33010602011771号