VS2005下CString转char*的简单方法
方法一:
CString cstring;
USES_CONVERSION;
char str[MAX_STRING];
strcpy_s(str, MAX_STRING, W2A( cstring );
方法二:
CString cstring;
const char * constChar=(LPSTR)(LPCTSTR)cstring;
方法一:
CString cstring;
USES_CONVERSION;
char str[MAX_STRING];
strcpy_s(str, MAX_STRING, W2A( cstring );
方法二:
CString cstring;
const char * constChar=(LPSTR)(LPCTSTR)cstring;