This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: Problem with wchar_t


> From: Alex Vinokur [mailto:alexvn at connect dot to]
> 
> wchar_t wch1 = 65;
> 
> Why does 'cout << wch1' print '65' (but not 'A') ?

Because you're trying to write a wide character to a narrow character
stream. To get 'A', you'd need to write it to wcout instead of cout.
But you'll find you can't do that anyway, because Cygwin doesn't
support wide characters (it has the wchar_t type, but not much else).

-- 
Ross Smith ...................... Pharos Systems, Auckland, New Zealand

        "It's never too soon to start planning, and, in fact,
                it's usually too late." -- Chad Orzel

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]