Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

MFC and Significant figures

Status
Not open for further replies.

BluShu

Programmer
Jan 20, 2002
5
0
0
US
Alright my mission is to write a windows MFC program that prompts the user to enter 2 floating point values, and display their product. Sounds easy so far, however, the program must correctly handle significant figures and rounding. Is there any easy way to do this?? I am completly lost, and somewhat new at this. Any suggestions will help..

Thanks

BluShu
 
The MFC CString::Format() function works a lot like printf(). Use a format string something like "%09.9f". The details are left to you to investigate... as a learning opportunity!

Check the format specifiers for printf() or CString::Format() in the MSDN library (if you don't have access to a CD, then go to msdn.microsoft.com and look on the menu for the MSDN library. It's all online).
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top