
Associated with each stream is a locale that impacts the parsing and formatting of numeric values. This is how localization of software takes place. As discussed in Section 2.2.2, the representation of numbers often depends on cultural conventions. In particular, the decimal point need not be a period, as in the following example:
cout.imbue(locale("De_DE"));
cout << 1000000.50 << endl;
The output will be:
1000000,50
Other cultural conventions, like the grouping of digits, are irrelevant. There is no formatting of numeric values that involves grouping.4
©Copyright 1998, Rogue Wave Software, Inc.
Send mail to report errors or comment on the documentation.