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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Setting how many numbers after decimal

Status
Not open for further replies.

Cirilia

Programmer
Mar 10, 2003
16
0
0
US
In the visual portion of c++, that is, the MFC AppWizard section, what coding will help me set the number of places after decimal point to 2? I looked in the help index and it says to use SET DECIMAL TO [nDecimal], but this code does not work when I put it in the program like so:

SET DECIMAL TO [2];

Are there any other functions that will help me do this?
 
Did you look at the CString::Format(...) member? I am assuming that you are tring to display the data in an Edit control or label.

If you choose to battle wits with the witless be prepared to lose.

[cheers]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top