STL, cout, wcout, TCHAR, unicode?



Hi,

As I understand it, Microsoft's TCHAR type and _T() macro can morph between char and wchar_t depending on whether UNICODE is defined.

With STL it appears you'd have to choose std::cout or std::wcout, but there's no std::tcout. Same issue for the rest of the standard library.

Is there any way to switch the whole library between ANSI and Wide, or a better way of doing it all together?

--
Gerry Hickman (London UK)
.



Relevant Pages

  • Re: STL, cout, wcout, TCHAR, unicode?
    ... Microsoft's TCHAR type and _Tmacro can morph between char and wchar_t depending on whether UNICODE is defined. ... With STL it appears you'd have to choose std::cout or std::wcout, ... David Wilkinson ...
    (microsoft.public.vc.language)
  • Re: convert string to LPSTR
    ... LPTSTR is either char* or wchar_t* depending on _UNICODE ... > use TCHAR to address individual characters. ...
    (microsoft.public.vc.language)
  • Re: How to LPCTSTR Convert to char *
    ... number of people who use 'char' because they've never grown beyond their first programming ... These are the people who are getting nuked by VS2005 which defaults to Unicode apps. ... isolated to the embedded interface (rare and exotic situation imposed by external ... fields with char strings is quite essential. ...
    (microsoft.public.vc.mfc)
  • Re: Window types
    ... typedef WCHAR TCHAR, * PTCHAR; ... typedef char TCHAR, * PTCHAR; ... Under a Unicode build, ... If the only text your app needs to deal with can be handled with ASCII ...
    (microsoft.public.vc.language)
  • Re: DDX_Control and Japanese
    ... The ones left as char, ... Unicode, and then came the picking up of the things I had ... the file format would be the same if I did a Unicode and a non-Unicode ... wide character version::GetGlyphOutlineW, ...
    (microsoft.public.vc.mfc)