摘要:
1、String类方法汇总 2、构造器和析构器 C_string一般认为是常规的C++字符串,目前存在一个从const char*到string是隐式转换,却不存在从string对象到C_string的自动类型转换,对于类型string类型的字符串,可以通过c_str()返回该string类对象对应 阅读全文
posted @ 2017-09-28 23:27
陈辻柒
阅读(169)
评论(0)
推荐(0)
摘要:
auto_ptr类 auto_ptr类,主要用于管理动态内存分配。当auto_ptr对象过期时,析构函数将使用delete来释放内存。将new返回的地址赋值给auto_ptr对象时,无须记住还需要释放这些内存。在auto_ptr对象过期时,内存将自动被释放。 使用auto_ptr对象时,必须包含头文 阅读全文
posted @ 2017-09-28 22:59
陈辻柒
阅读(313)
评论(0)
推荐(0)

浙公网安备 33010602011771号