You need to use wcout
instead of cout
for wide characters. Do this:
#ifdef UNICODE
typedef wchar_t TCHAR;
#define TEXT(quote) L##quote
#define COUT wcout
#else
typedef char TCHAR;
#define TEXT(quote) quote
#define COUT cout
#endif
and then:
TCHAR* test = TEXT("test");
COUT << test;