Auf Kommentar antworten

Many thanks

Exaustive and complete explanation and example. Thank you.
I used it in a function to return the formatted string: (thanks also to www.cplusplus.com)


std::string FormatNumber(long Number){
Currency const qty(Number);
std::stringstream Convert;
std::locale MyLocale( std::locale(), new GermanPunct() ); // Create customized locale
Convert.imbue(MyLocale); // Imbue the custom locale to the stringstream
Convert << std::showbase << std::fixed << qty; // Use some manipulators
return Convert.str(); // Give the result to the string
}

Antworten

  • Internet- und E-Mail-Adressen werden automatisch umgewandelt.
  • Zulässige HTML-Tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Zeilen und Absätze werden automatisch erzeugt.

Weitere Informationen über Formatierungsoptionen

CAPTCHA
Diese Frage prüft, ob Sie ein Mensch sind und kein Bot, um Spam vorzubeugen.
Bild-CAPTCHA
Enter the characters shown in the image.