Hi,
I've read that the _T("...") or TEXT("...") macros basically expand to L"..." when UNICODE is defined and "..." when it isn't.
For literal strings like that, it makes sense, but what about pointers? Is there a way to do the same kind of thing with variables?
If I do this:
I get an error since it just puts an L infront of the variable name.
I've read that the _T("...") or TEXT("...") macros basically expand to L"..." when UNICODE is defined and "..." when it isn't.
For literal strings like that, it makes sense, but what about pointers? Is there a way to do the same kind of thing with variables?
If I do this:
Code:
char szData[256];
strcpy( szData, "Hello World" );
std::wstring wStr( _T( szData ) ); // C2065: 'LszData' : undeclared identifier