Funny locale problem

M

Matthias Kluwe

Hi!

My problem looks like this:

#include <locale>
#include <iostream>

int main(int argc, char* argv[])
{
std::locale::global( std::locale( "deu" ) );
std::cout.imbue( std::locale() );
std::cout << 1000.4 << " " << 0.4 << std::endl;
return 0;
}

This is MS VC++ 7.1 here (this explains the "deu" locale).

Output is:

1,000.4 0,4

Now, this is confusing! I really expected

1.000,4 0,4

in german locale.

Any suggestions?

Regards,
M. Kluwe
 
M

Matthias Kluwe

Oops, this is a "double mis-post".

Please look at thread "locale and numeric output" if you want to answer
....

Thank you!

Matthias
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top