CString to char* implementation method

SCString str(_T("Hello!"));

USES_CONVERSION;

char* p = T2A(str.GetBuffer(0));

str.ReleaseBuffer();

 

After searching for a long time, I finally did it with this method. This is Microsoft's ready-made conversion function. This is used when doing mfc and php socket Chinese character transmission.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325041682&siteId=291194637