From: those who know me have no need of my name Newsgroups: alt.comp.lang.learn.c-c++,comp.lang.c++,comp.os.msdos.djgpp Subject: Re: char[] & non-Latin letters Followup-To: alt.comp.lang.learn.c-c++ Date: 28 Aug 2002 03:43:05 GMT Organization: earthfriends Message-ID: References: <3D6B432F DOT 4552DB3E AT mail1 DOT stofanet DOT dk> User-Agent: Gnus/5.090008 (Oort Gnus v0.08) XEmacs/21.4 (Informed Management (RC1), i686-redhat-linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Complaints-To: newsabuse AT supernews DOT com Lines: 27 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com [fu-t set] in alt.comp.lang.learn.c-c++ i read: >#define TEST_VALUE 65 > >char c_value = TEST_VALUE; >wchar_t wc_value = TEST_VALUE; you presume too much. you think you know that 65 is a character, but there is no guarantee that it is, whether you use char or wchar_t -- you have no idea what that encoding may be used. use character literals when you mean to initialize character variables, e.g., char c_value = 'A'; wchar_t wc_value = L'A'; > cout << c_value << endl; > cout << wc_value << endl; wcout << wc_value << endl; yes it's cumbersome that cout doesn't adapt to wide arguments, but that's life. -- bringing you boring signatures for 17 years