delete 问题
char* inbuf;
int inLen;
CString strCountry="China";
inLen=strCountry.GetLength();
inbuf=new char[inLen+1];
//strcpy(inbuf,strCountry);
inbuf=strCountry.GetBuffer(0);
strCountry.ReleaseBuffer();
TRACE("TEST");
TRACE(inbuf);
delete inbuf;
为什么这样delete时会报异常?
而不用GetBuffer,用//strcpy(inbuf,strCountry);时不会报异常??