/*********************************************************************/
/* Operating Systems Concepts (MSc Conv / JMC2) 2003/'04             */
/*                                                                   */
/* typeagain.cpp - C program to type out the contents of a text file */
/*                                                                   */
/* Olav Beckmann 2003-11-20                                          */
/*********************************************************************/

#include <iostream>
#include <fstream>
#include <assert.h>

#define length 100

int main( int argc, char *argv[] ) {
  char buffer[length];

  assert( argc == 2 );

  ifstream toRead( argv[1], ios::in );

  while( toRead.getline(buffer, length, '\n') ) {
    cout << buffer << endl;
  }
  
  toRead.close();
  return 0;
}

