/*************************************************** * File Name: example1.cpp * * Date: July 8, 2004 * * file processing * ****************************************************/ #include #include #include #include #include // for setw, setiosflags, etc... using namespace std; //char line[256]; //char *tokenPtr; int num=0; // main method int main(int argc, char* argv[]) { //check if the use of command line arguments are correct if (argc == 2) { // open file for reading and writing fstream datafileOpen; datafileOpen.open( argv[1], ios::in); // exit program if fstream cannot open file if (datafileOpen.fail() ) { cerr << "File " << argv[1] <<" could not be opened." << endl; exit ( 1 ); } // end if while(!datafileOpen.eof()) { char line[256]; // read in a line from file datafileOpen.getline(line, 256); //cout<\n"; return 1; } }