September 4th, 2009, 08:40 PM
Here's the way I look at it. When I program for Windows, I wrap any string or char literals in _T() and I never have to worry about it.
September 4th, 2009, 01:31 PM
It depends how temp is defined. If defined as char[], then you won't get errors. If defined as wchar_t[], then you should. I find developers have the least amount of trouble when coding in windows...
September 4th, 2009, 12:16 PM
Yes.
if( temp[pos] == _T('p') || temp[pos] == _T('P') )
{
}
September 4th, 2009, 09:41 AM
While you *can* have both ANSI and UNICODE in a single program, I'd recommened that you compile your program for all UNICODE. If you have data coming in (or going out) that's then convert the data...
September 3rd, 2009, 11:04 AM
This really is more of the VC and windows environment than MFC. The bottom line is that if you use _T("") around string literals, it will work for both. If you use "" or L"", you could run into...
September 3rd, 2009, 10:59 AM
You can also use the conversion macros.
USES_CONVERSION;
std::wstring val
CString src