Files and Streams in C++

  #include <iostream.h> // cin/cout streams
  #include <fstream.h>  // file streams

  ofstream outFile;     // declare an output file stream

  cout << "This writes to the display screen";
  outFile << "This writes to a disk file"; 
Next page

Back to Lesson 13 Index
Back to Outline