09/06/10 20:17:11
>>858
自分で作ればいい。
#ifdef UNICODE
# define tcin std::wcin
# define tcout std::wcout
# define tcerr std::wcerr
# define tclog std::wclog
#else
# define tcin std::cin
# define tcout std::cout
# define tcerr std::cerr
# define tclog std::clog
#endif
あと、mainの頭で、文字コード変換が行われるように指示しておく。
std::locale l(""); // 数値を取り扱うならstd::locale l(std::locale::classic, "", std::locale::ctype);のほうがよいかも。
tcin.imbue(l);
tcout.imbue(l);
tcerr.imbue(l);
tclog.imbue(l);