everest% CC qsort1.C -o qsort1
"qsort1.C", line 94: error(1164): argument of type
          "int (*)(const data *, const data *)" is incompatible with parameter
          of type "int (*)(const void *, const void *)"
     qsort(A, n, sizeof(data), compare) ;
                               ^

1 error detected in the compilation of "qsort1.C".
everest% 

everest% g++ qsort1.C -o qsort1
everest% 

everest% qsort1
Usage: qsort num seed
everest% 

everest% qsort1 50 1234

Original Array:
    1591021091      460710097      726270023      693929866     2144692181 
     622520595       21631094     1088438839     1266447631      600035045 
     896404261      775208276      805765808      703737501      406481815 
    1527204111     1136005240      693398226     2070242885     2146234958 
    1262983319     1454415386     1827415158     1576091462     1807746511 
     932030190     1494343543     1344463661      282894920     1588449194 
     459486584     1295170311      578939120     1122284721     1206104579 
     351045021     1165837196     1066019502      397485081      487975053 
    1570791264       15075061      524811243     1278702714     1765073527 
     898419719     1506642482     1880914531      313125776     1306745908 

Sorted Array:
      15075061       21631094      282894920      313125776      351045021 
     397485081      406481815      459486584      460710097      487975053 
     524811243      578939120      600035045      622520595      693398226 
     693929866      703737501      726270023      775208276      805765808 
     896404261      898419719      932030190     1066019502     1088438839 
    1122284721     1136005240     1165837196     1206104579     1262983319 
    1266447631     1278702714     1295170311     1306745908     1344463661 
    1454415386     1494343543     1506642482     1527204111     1570791264 
    1576091462     1588449194     1591021091     1765073527     1807746511 
    1827415158     1880914531     2070242885     2144692181     2146234958 

Array is properly sorted
everest% 

everest% qsort1 33 7870

Original Array:
     826775265     1883033015     1423671861     1114942944     1289158259 
     969014873      974324548     1920776173     1420040077      902378123 
     172530899     1586436202       10325774      651191971     1119201829 
    2057076613     1307854006     1441291576     1278427059      777214500 
    1534333621     1191153888      791635652     1175359100     1865237453 
    1022050324     1552693413     1371680707      247923238     1916933424 
    1937978246     1778023165      617457838 

Sorted Array:
      10325774      172530899      247923238      617457838      651191971 
     777214500      791635652      826775265      902378123      969014873 
     974324548     1022050324     1114942944     1119201829     1175359100 
    1191153888     1278427059     1289158259     1307854006     1371680707 
    1420040077     1423671861     1441291576     1534333621     1552693413 
    1586436202     1778023165     1865237453     1883033015     1916933424 
    1920776173     1937978246     2057076613 

Array is properly sorted
everest% 
