// file: lecture_34/example.cc // // include files // #include "List.h" // local constants // #define MAX_LINE_LEN 99 // method: main // // read command line arguments and load them onto the list // int main(int argc, char** argv) { // create a list // List foo; // loop over the command line arguments // for (long i = 1; i < argc; i++) { // insert an element // foo.insert(atoi(argv[i])); // display the list // char buf[MAX_LINE_LEN]; sprintf(buf, "attempt no. %d", i); foo.display(buf); // add a line delimiter // fprintf(stdout, "\n"); } // exit gracefully // return(0); }