TCHAR *ptch = TEXT("This is a const string."); 如果使用UNICODE字符集, 则TEXT("This is a const string.")相当于L"This is a const string.", 如果使用ASCII集, 则上述字符串相当于“This is a const string.”.这样, 写的程序既可以使用UNICODE, 也可以使用ASCII, 增强了移植性. 在写windows应…
Quote from: http://vctipsplusplus.wordpress.com/2008/05/21/cstring-to-tchar/ CString is a very useful MFC class for string management. But, sometimes we want to convert CString data to TCHAR or something. here is one small code snippet for performing…