By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,130 Members | 1,365 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,130 IT Pros & Developers. It's quick & easy.

Funny locale problem

P: n/a
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

Jul 23 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Oops, this is a "double mis-post".

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

Thank you!

Matthias

Jul 23 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.