CString是在windows平台下开发中经常使用的字符串类,
CString已从MFC中剥离出来了,可以单独使用,只需引用atlstr.h头文件即可。
include "stdafx.h"
#include <atlstr.h>
#include <iostream> using namespace std; int _tmain(int argc, _TCHAR* argv[])
{
//控制台应用程序中使用CString 包含 atlstr.h头文件即可
CString str(_T("CString TEST!"));
wcout << str.GetBuffer() << endl;
return ; }