// University of Iowa // 22C-30 Homework 3 // Problem 2 // by: Justin C. Miller // Prof: Sriram // Description: implement queue // with singly linked // list, have only one // pointer (to the front) // time your program // using CTimer on // 1000,2000,....,9000,10000 // enqueue calls #include // for cin, cout #include // for EXIT_SUCCESS #include // for string #include "queue.h" // for queue #include "atimer.h" // for atimer //#include "ctimer.h" // for CTimer using namespace std ; // don't have std::cin int main(int argc, char * argv[]){ queue q[10] ; atimer t ; for(int i = 0 ; i < 10 ; i++){ t.Start() ; for(int j = 0 ; j < (i+1)*1000 ; j++) q[i].enqueue(j+1) ; t.Stop() ; cout << ((i+1) * 1000) << " enqueue" << " operations took " << t.ElapsedTime() << " sec." << endl ; }//for cout << "Cumalative time of all enqueue" << " operations was " << t.CumulativeTime() << " sec." << endl ; return EXIT_SUCCESS ; }//end of main function