home *** CD-ROM | disk | FTP | other *** search
/ CD Actual 13 / CDA13.ISO / cdactual / demobin / share / program / C / ANSICPP.ZIP / EX10025.CPP < prev    next >
Encoding:
C/C++ Source or Header  |  1990-07-24  |  290 b   |  15 lines

  1. // ex10025.cpp
  2. // open and close member functions
  3. #include <fstream.h>
  4.  
  5. main()
  6. {
  7.     ofstream tfile;    // an ofstream object without a file
  8.     tfile.open("test1.dat");
  9.     tfile << "This is TEST1";
  10.     tfile.close();
  11.     tfile.open("test2.dat");
  12.     tfile << "This is TEST2";
  13.     tfile.close();
  14. }
  15.