w stays for wide character standard iostream function cout deal just with simple characters and you can't sent wchar_t string in to the stream. For that there is separate set of functions, mostly with w in front of name. Look here:http://msdn.microsoft.com/library/defau ... embers.asp
Yes, that is what I was thinking too since to me there seems no other reason. On the other hand I am not expert programer, so I may use help of more experienced ones.
I was looking in to iostream file and there stays:
#ifndef _CPP_IOSTREAM
#define _CPP_IOSTREAM 1
#pragma GCC system_header
#include <bits/c++config.h>
#include <ostream>
#include <istream>
namespace std
{
/**
* @name Standard Stream Objects
*
* The <iostream> header declares the eight <em>standard stream
* objects</em>. For other declarations, see
* http://gcc.gnu.org/onlinedocs/libstdc++/27_io/howto.html#10 and the
* @link s27_2_iosfwd I/O forward declarations @endlink
*
* They are required by default to cooperate with the global C library's
* @c FILE streams, and to be available during program startup and
* termination. For more information, see the HOWTO linked to above.
*/
//@{
extern istream cin; ///< Linked to standard input
extern ostream cout; ///< Linked to standard output
extern ostream cerr; ///< Linked to standard error (unbuffered)
extern ostream clog; ///< Linked to standard error (buffered)
#ifdef _GLIBCPP_USE_WCHAR_T
extern wistream wcin; ///< Linked to standard input
extern wostream wcout; ///< Linked to standard output
extern wostream wcerr; ///< Linked to standard error (unbuffered)
extern wostream wclog; ///< Linked to standard error (buffered)
#endif
//@}
// For construction of filebuffers for cout, cin, cerr, clog et. al.
static ios_base::Init __ioinit;
} // namespace std
#endif
This file is in include/c++/3.3.1 directory of DevC++
wprintf and wscanf works without problems on the other hand.
the block that defines wcin and wcout is only active when there is a
preprocessor constant defined named _GLIBCPP_USE_WCHAR_T
That is simple to do:
place a line:
#define _GLIBCPP_USE_WCHAR_T
above your #include <iostream.h> line.
Usually you can also do stuff like that on the command line, but I don't know devc++ so can't help you with that method.
Anyway, that should take care of the compile-phase.