cplusplus
.com
TUTORIALS
REFERENCE
ARTICLES
FORUM
C++
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs
Forum
General C++ Programming
setprecision
setprecision
Sep 1, 2011 at 2:50pm UTC
Dountac
(1)
Hello,
the following line is printing -0.00
cout << std::setiosflags(std::ios::fixed) << std::setprecision(2)
<< std::setiosflags(std::ios::showpoint) << -0.0001;
I would like to print 0.00 without rounding (to keep it in one line). Any idea?
Many thanks for your help,
Topic archived. No new replies allowed.