Easiest way to print currency symbol internationally . . .
by "jehugaleahsa@[EMAIL PROTECTED]
" <jehugaleahsa@[EMAIL PROTECTED]
>
Mar 7, 2008 at 03:31 AM
Hello:
Is there an easier, more correct way to print out currency than this:
std::locale germanLocale("german");
std::cout.imbue(germanLocale);
std::cout
<< std::fixed
<< std::setprecision(2)
<<
std::use_facet<std::moneypunct<char>>(germanLocale).curr_symbol()
<< 1000000.00
<< std::endl;
The outputted currency symbol isn't even correct.
Also, is there a way to get a list of locales on my machine? platform
independently?
--
[ See http://www.gotw.ca/resources/clcm.htm
for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]