method 1 :
CString str("xxx");
char* car = new char[3];
sprintf(car,"%s",str);
delete car[];
method 2:
CString str("1556666");
const char* pBuff = (char*)(LPCSTR) str;
method 3:
CString str="try";
char * pBuffer= new char[str.GetLenght()+1]; //GetLenght does not
// include the /0
strcpy(pBuffer,str);
delete pBuffer[];
CString str("xxx");
char* car = new char[3];
sprintf(car,"%s",str);
delete car[];
method 2:
CString str("1556666");
const char* pBuff = (char*)(LPCSTR) str;
method 3:
CString str="try";
char * pBuffer= new char[str.GetLenght()+1]; //GetLenght does not
// include the /0
strcpy(pBuffer,str);
delete pBuffer[];