Hi, People. How to copy from char *buff to CString?
I've got such an sample:
everything is good but after I try to delete [] buff; there is error.
I guess that I'm trying to delete the same chunk of memory 'cause
strCont and buff point at the same address. So I need to copy buff to
strCont.
With due respect.
I've got such an sample:
Code:
int size=file.GetLength();
char *buff=new char(size);
file.Read(buff,size);
file.Close();
strCont=*buff;
//strCont=buff; don't work either
delete [] buff;
return strCount;
I guess that I'm trying to delete the same chunk of memory 'cause
strCont and buff point at the same address. So I need to copy buff to
strCont.
With due respect.