[Dev-C++] newbie formatting question
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: Ensign, D. <DE...@Pa...> - 2003-04-30 14:30:50
|
Morning, Im only in my second chapter of C++ so please bare that in mind. The book Im using is teaching me about VERY BASIC formatting at this point. The book came with Visual Dev 6.0 but I didnt want that so Im using Dev C++. Can someone show me how to display a float and double? WHen I try the float gets chopped off. I cant get cout.precision(); to work either nor the cout.setf(ios::showpoint); I added them like this: cout.setf(ios::showpoint); cout.precision(8); cout << "\n Here is my float variable" << Float; cout.unsetf(ios::showpoint); Thanks in advance for any help anyone can offer. Best, Dane Ensign |