From: "Alex Vinokur" Newsgroups: alt.comp.lang.learn.c-c++,comp.lang.c++,comp.os.msdos.djgpp Subject: Re: char[] & non-Latin letters Date: Tue, 27 Aug 2002 23:57:25 +0200 Lines: 175 Message-ID: References: <3D6B432F DOT 4552DB3E AT mail1 DOT stofanet DOT dk> NNTP-Posting-Host: 212.150.34.12 X-Trace: fu-berlin.de 1030481865 53162060 212.150.34.12 (16 [79865]) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4522.1200 X-Mimeole: Produced By Microsoft MimeOLE V5.50.4522.1200 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com "Ron Natalie" wrote in message news:j5Ra9.2587$gw DOT 28 AT atlpnn01 DOT usenetserver DOT com... > > "Alex Vinokur" wrote in message > news:akgl7a$1i2cm0$1 AT ID-79865 DOT news DOT dfncis DOT de... > > > cout << wc_value << endl; > > You have to use a wide stream > wcout << wc_value << endl; > > > > =============== Windows 2000 DJGPP 2.03 gcc/gpp version 3.1 =============== ========= C++ code : BEGIN ========= // File ttt.cpp #include #include using namespace std; int main () { #define TEST_VALUE 65 char c_value = TEST_VALUE; wchar_t wc_value = TEST_VALUE; cout << c_value << endl; wcout << wc_value << endl; return 0; } ========= C++ code : END =========== ========= iostream : BEGIN ========= [---omitted---] #ifndef _CPP_IOSTREAM #define _CPP_IOSTREAM 1 #pragma GCC system_header #include #include #include namespace std { extern istream cin; extern ostream cout; extern ostream cerr; extern ostream clog; #ifdef _GLIBCPP_USE_WCHAR_T extern wistream wcin; extern wostream wcout; extern wostream wcerr; extern wostream wclog; #endif // For construction of filebuffers for cout, cin, cerr, clog et. al. static ios_base::Init __ioinit; } // namespace std #endif ========= iostream : END =========== ========= iostream.h : BEGIN ========= [---omitted---] #ifndef _CPP_BACKWARD_IOSTREAM_H #define _CPP_BACKWARD_IOSTREAM_H 1 #include "backward_warning.h" #include using std::iostream; using std::ostream; using std::istream; using std::ios; using std::streambuf; using std::cout; using std::cin; using std::cerr; using std::clog; #ifdef _GLIBCPP_USE_WCHAR_T using std::wcout; using std::wcin; using std::wcerr; using std::wclog; #endif using std::ws; using std::endl; using std::ends; using std::flush; #endif // Local Variables: // mode:C++ // End: ========= iostream.h : END =========== ========= Compilation : BEGIN ========= %gpp -v ttt.cpp Reading specs from c:/djgpp/lib/gcc-lib/djgpp/3.1/specs Configured with: ../configure i586-pc-msdosdjgpp --prefix=/dev/env/DJDIR --disab le-nls Thread model: single gcc version 3.1 c:/djgpp/lib/gcc-lib/djgpp/3.1/cc1plus.exe -v -D__GNUC__=3 -D__GNUC_MINOR__=1 - D__GNUC_PATCHLEVEL__=0 -D__MSDOS__ -D__GO32__ -D__DJGPP__=2 -D__unix__ -D__MSDOS __ -D__GO32__ -D__DJGPP__=2 -D__unix__ -Asystem=msdos -Asystem=unix -D__NO_INLIN E__ -D__STDC_HOSTED__=1 -Acpu=i386 -Amachine=i386 -Di386 -D__i386 -D__i386__ -D_ _tune_i586__ -D__tune_pentium__ -DMSDOS -DGO32 -DDJGPP=2 -Dunix -remap -imacros c:/djgpp/lib/gcc-lib/djgpp/3.1/djgpp.ver ttt.cpp -D__GNUG__=3 -D__DEPRECATED -D_ _EXCEPTIONS -D__GXX_ABI_VERSION=100 -quiet -dumpbase ttt.cpp -version -o c:/djgp p/tmp/ccRB2uV1.s GNU CPP version 3.1 (cpplib) (80386, BSD syntax) GNU C++ version 3.1 (djgpp) compiled by GNU C version 3.1. ignoring nonexistent directory "c:/djgpp/djgpp/include" #include "..." search starts here: #include <...> search starts here: c:/djgpp/lang/cxx-v31 c:/djgpp/lang/cxx-v31/djgpp c:/djgpp/lang/cxx-v31/backward c:/djgpp/lib/gcc-lib/djgpp/3.1/include c:/djgpp/include End of search list. ttt.cpp: In function `int main()': ttt.cpp:13: `wcout' undeclared (first use this function) ttt.cpp:13: (Each undeclared identifier is reported only once for each function it appears in.) ========= Compilation : END =========== So, we can see that `wcout' undeclared because _GLIBCPP_USE_WCHAR_T undefined. What is way out ? ================== Alex Vinokur mailto:alexvn AT go DOT to http://up.to/alexvn ==================