CString转换为LPCTSTR有关问题
CString转换为LPCTSTR问题
这段代码错在哪里啊?谢谢回答 。
------解决方案--------------------
LPCTSTR是个指针类型。
而CString是个C++的类。
- C/C++ code
#include "iostream" #define _AFXDLL #include "afx.h" #pragma comment(linker,"/ENTRY:TEST") using namespace std; int TEST() { LPCTSTR xx = CString("asdfas"); cout << xx << endl; cin.get(); return 0; }
这段代码错在哪里啊?谢谢回答 。
------解决方案--------------------
LPCTSTR是个指针类型。
而CString是个C++的类。
- C/C++ code
LPCTSTR xx = CString("asdfas");