CString转换为LPCTSTR问题
- 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");