
-----------------------------------
liangchenen
Mon Aug 08, 2005 8:59 pm

how to put a real number into a file
-----------------------------------
if I have a variable mark. and it is 98.123123

and I want to put this real number into a file called "mark.out" with 2 decimals places, can anybody tell me how to do this in C++?

-----------------------------------
wtd
Mon Aug 08, 2005 9:09 pm


-----------------------------------
#include 
#include 

int main()
{
   std::ofstream outputFile("mark.out");
   double mark(98.123123);

   outputFile 