cplusplus
.com
TUTORIALS
REFERENCE
ARTICLES
FORUM
C++
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs
Forum
Beginners
Formatting strings
Formatting strings
Aug 22, 2011 at 7:50pm UTC
mgfacioli
(1)
Is there a simple way to format a numeric string such as "100000" to a string type like "1,000.00" in C++?
I appreciate any example.
Aug 22, 2011 at 8:24pm UTC
quirkyusername
(792)
http://cplusplus.com/reference/string/string/insert/
Aug 23, 2011 at 1:43am UTC
sohguanh
(1236)
If you are going to do it for this stand-alone formatting, it is ok but if your final objective is not only those but also involve time separators, currency separators etc etc look at
http://www.cplusplus.com/reference/std/locale/
Topic archived. No new replies allowed.