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

  1. // ex10023.cpp
  2. // an fstream file
  3. #include <fstream.h>
  4. #include <ctype.h>
  5.  
  6. main()
  7. {
  8.     fstream tfile("test.dat", ios::in | ios::app);
  9.     char tdata[100];
  10.     int i = 0;
  11.     while (!tfile.eof())
  12.         tfile.get(tdata[i++]);
  13.     tfile.clear();
  14.     for (int j = 0; j < i; j++)
  15.         tfile.put(toupper(tdata[j]));
  16. }
  17.