944,014 Members | Top Members by Rank

Ad:
  • C++ Discussion Thread
  • Unsolved
  • Views: 748
  • C++ RSS
Jul 10th, 2007
0

Reducing floating point numbers.

Expand Post »
For a program I'm writing I only need two digits past the decimal.I was a c programmer and the way I would have done this was
C++ Syntax (Toggle Plain Text)
  1. printf("%2f",variable);
Is there anything like this in cout?
Last edited by Elfshadow; Jul 10th, 2007 at 6:02 am.
Similar Threads
Reputation Points: 10
Solved Threads: 0
Light Poster
Elfshadow is offline Offline
27 posts
since Jan 2007
Jul 10th, 2007
0

Re: Reducing floating point numbers.

Reputation Points: 85
Solved Threads: 42
Nearly a Posting Virtuoso
vishesh is offline Offline
1,362 posts
since Oct 2006

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in C++ Forum Timeline: powers in c++
Next Thread in C++ Forum Timeline: winsock problem





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC