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
Cut off numbers/words
Cut off numbers/words
Jan 29, 2010 at 7:56pm UTC
Zeldami
(22)
Hi people,
I'd like to know if (and how) you can cut off numbers and words.
Example:
I have:
double = 1.23456789
How do I cut off till I have 2 (or 3) decimals left.
Jan 29, 2010 at 8:01pm UTC
mcleano
(922)
http://www.cplusplus.com/reference/iostream/manipulators/setprecision/
Jan 29, 2010 at 8:02pm UTC
Zeldami
(22)
Thanks =)
Now I remember I've seen that before =D
Topic archived. No new replies allowed.