All pastes #272939 Raw Edit

Miscellany

public text v1 · immutable
·published 2006-12-09 12:53 UTC
rendered paste body
#include <iostream.h>
#include <fstream.h>
#include <stdlib.h>
int main () 
    { 
      char buffer[256]; 
      ifstream gamefile ("gamefile.txt"); 
      if (! gamefile.is_open()) 
         { 
         cout << "Error opening file"; 
         exit (1); 
         } while (! gamefile.eof() ) 
           { 
           gamefile.getline (buffer,100); 
           cout << buffer << endl; } return 0; 
    }