decimal place help needed

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
artgirloc

decimal place help needed

Post by artgirloc »

I am having trouble with a program I am writing.  I calls for output using a different number of deciaml places for each output.  I am using Visual Basic C++.  I have the folowing lines in my program:

cout << fixed << showpoint;

then some equations then,

cout << setprecision(0) << htInches << " inches" << endl;
cout << setprecision(2) << htMeters << " meters" <<endl;
cout << setprecision(0) << htCentimeters<< " centimeters" << endl;

I am racking my brain trying to get this to work.  I have been all through the book also.  No help at all.  Any help I can get would be appreciated.  Thank you in advance.
Post Reply