Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > C++ Moderated > Easiest way to ...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 5 Topic 9357 of 10094
Post > Topic >>

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! ]
 




 5 Posts in Topic:
Easiest way to print currency symbol internationally . . .
"jehugaleahsa@[EMAIL  2008-03-07 03:31:37 
Re: Easiest way to print currency symbol internationally . . .
Alberto Ganesh Barbati &l  2008-03-07 19:07:21 
Re: Easiest way to print currency symbol internationally . . .
"jehugaleahsa@[EMAIL  2008-03-08 16:49:34 
Re: Easiest way to print currency symbol internationally . . .
Martin Sebor <msebor@[  2008-03-11 21:49:05 
Re: Easiest way to print currency symbol internationally . . .
Alberto Ganesh Barbati &l  2008-03-12 19:34:58 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sat Oct 11 18:29:24 CDT 2008.