using namespace std; #include #include #include /* Timing the performance of the built-in quicksort function type "man qsort" on any unix/linux prompt for information */ // function to compare two integers: int comp(const void *x, const void *y) { int a, b; a = *((const int*)x); b = *((const int*)y); return a-b; } int main(int argc, char** argv) { int n; // size of array, determined by command-line argument int *A; // array to be dynamically created clock_t t1, t2; // for time measurements n = atoi(argv[1]); // first command-line argument A = new int[n]; for(int i=0;i