This question already has an answer here:
- How I can print the wchar_t values to console? 7 answers
There is a macro defined as below:
#ifdef UNICODE
typedef wchar_t TCHAR;
#define TEXT(quote) L##quote
#else
typedef char TCHAR;
#define TEXT(quote) quote
#endif
When I try to print a message using std::cout as below:
TCHAR* test = TEXT("test");
cout << test;
What I get the address such as 00D82110 instead of the value "test".
Can anybody give any suggestion how can I print the value here? Thanks a lot!