#include <iostream.h>         //for cout
#include <fstream.h>          //for file load and save
#include <stdlib.h>           //for _sleep
//This is a simple program that saves and opens a file
//If you have System Monitor on you computer open it up while using this
//program and click Edit>Add Item and go to File System:Writes/Second then
//do it again for:
//File System:Reads/Second, File System:Bytes Written/Second, and
//File System:Bytes Read/Second. Open up as many file opener programs as you
//like and watch those numbers jump!  Highest I've gotten is on
//File System:Bytes Writted/Second is 257. with 5 file openers running.

int file=0;                             //file it's on
char filename[100]="File.txt";          //file name
int main()                              //main function
{                                       //start of function
  file++;                               //add one to file
  cout<<"File Number:"<<file<<"\n";     //output file number
  ifstream file1(filename);             //open filename
  //if(!file1){                         //if there is no filename make one
  ofstream filen(filename);             //make filename
  filen<<"Hello";                       //put "Hello" into new file
  filen.close();                        //close new file
  //}                                   //end if (take out the // before if
  // and this comment so the program checks if filename is there.
  file1.close();                        //close filename
  _sleep(100);                          //wait 100 ms
  main();                               //do again
  return 0;                             //end (will never be reached)
}                                       //end of function
