11 2014 档案
摘要:new char[1];分配一块连续的内存,也就是一个数组,里面有1个元素new char(1);分配一块内存,有一个元素,该元素被初始化为1
阅读全文
摘要:解决 after Normal block(#908) at 0x399EC0. CRT detected that the application wrote to memory after end of heap buffer 内存出错1. 数组越界所导致 char* pBuffer = new...
阅读全文
摘要:1.先来看这段代码:MyString::MyString(){ this->mstr = NULL;}MyString::MyString(MyString &str){ //用一个对象去初始化另一个对象 this->mstr = new char(strlen(str.mstr) + 1); st...
阅读全文