// skatingDemo.cc P. Conrad 10/26/05
// Demonstrate reading skating data from a file

#include "skating.h"
#include <iostream>
#include <fstream>
using namespace std;


const int MAXLINE = 1024;

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

  if (argc!=2)
    {
      cerr << "Usage: " << argv[0] << " filename " << endl;
      exit(1);
    }

  cout << "I will read skating data from the file " << argv[1] << endl;

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

  if (!infile)
    {
      cerr << "I could not read from the file " << argv[1] << endl;
      exit(2);
    }
  
  char inputLine[MAXLINE];
  
  infile.getline(inputLine,MAXLINE);

  cout << "I read from the file : " << inputLine << endl;
  
  // @@ This is where we need to add more code.

  infile.close();


  return (0);


}

