/////////////////////////////////////////////////////////////// // lineno.cpp - prepend line numbers to source code lines // // // // Language: Visual C++, ver 5.0 // // Platform: Micron Dual Pentium 200 // // Windows NT, ver 4.0, service pack 3 // // Application: Demonstration for ECS500 // // Author: Jim Fawcett, CST 2-187, (315) 443-3948 // // fawcett@neptune.syr.edu // /////////////////////////////////////////////////////////////// // Use: // // lineno file1.h file*.cpp >lineno.out // /////////////////////////////////////////////////////////////// // Build Process: // // I:\FAWCETT\setenv // // cl -GX lineno.cpp /link setargv.obj // // // // ver 1.1 - 7 June 98 // // - fixed bug in inner-most loop by checking for bad // // stream state should end of file be reached // /////////////////////////////////////////////////////////////// #include #include using namespace std; void main(int argc, char *argv[]) { ifstream in; int i; // step through each of command line arguments after 0th for(i=1; i