Best wishes, Frank !
Years ago, in dark medieval times,
Frank Masingill have written to Sarah Nunez:
FM> I know you are much further along than I am in learning C++ but
FM> thought I'd share something that with all of the aftermarket books and
FM> tutorials I have was not easy to find.
Thing you are looking for is very simple.... :)
FM> In order to get a correct format of a float I found that I had to
FM> use
FM> something called "setprecision" which I think is prototyped in
omanip.h.
FM> I don't know if there are any other ways of doing it or not. Most of
he
FM> example programs simply let it go at formatting a dollar amount to
FM> something like $25.00003 or something like that which was horrible.
Goog, watch here. You must put to your stream special functions called
"manipulators", which stored in "iomanip.h", of course. I don't know about
other compiles, becouse I use Borland 3.1 (best for education and suxx for
serious work).
There is examples with comments:
cout< * Origin: Night is so beautiful (we need her as we need Day) (2:5020/535.29)
|