JoeChenzzz

导航

2018年11月20日 #

动态内存

摘要: 1.new new操作符做两件事:分配内存+调用构造函数初始化对象 1.1operator new operator new是new操作符用来分配内存的函数,可以被重载 1.2placement new placement new是一个重载版本的operator new,它用于在一块已经被分配但是尚 阅读全文

posted @ 2018-11-20 11:20 JoeChenzzz 阅读(515) 评论(0) 推荐(0)

string流

摘要: istringstream和ostringstream 从istringstream类中读取数据赋值给某个string,写入某个string到ostringstream类,头文件<sstream> 实例:leetcode297 297. Serialize and Deserialize Binar 阅读全文

posted @ 2018-11-20 10:15 JoeChenzzz 阅读(382) 评论(0) 推荐(0)