在平常编程中经常遇到需要各种数据类型之间的转化,先做一个持续的归纳
1. CString转换为*char
CString str=_T("Hello World!");
char *outchar=new char[str.GetLength()];
outchar=(char*)(LPCTSTR)str;
2. CString转化为String
CString str=_T("Hello World!");
char *outchar=new char[str.GetLength()];
outchar=(char*)(LPCTSTR)str;
String text(outchar);