|
-
February 9th, 2003, 04:16 AM
#1
What means cout.precision (4)?
Hi, everyone!
What means cout.precision (4)? Who can give me
a sample to show the usage?
Thanks in advance,
George
-
February 9th, 2003, 04:24 AM
#2
it sets the precision of floating point numbers same as the "%.4f" formatter
example
cout.pecision(4);
cout << 445.26382011334;
will output
445.2638
It's only when you look at an ant through a magnifying glass on a sunny day that you realise how often they burst into flames
-
February 9th, 2003, 04:36 AM
#3
Thanks, SeventhStar buddies!
George
Originally posted by SeventhStar
it sets the precision of floating point numbers same as the "%.4f" formatter
example
cout.pecision(4);
cout << 445.26382011334;
will output
445.2638
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|