void qst(DArray *array, DArray_compare cmp, int low, int hi)
{
  if (low < hi) {
    int p = qs_partition(array, cmp, low, hi);
    qst(array, cmp, low, p);
    qst(array, cmp, p + 1, hi);
  }
}
Esempio n. 2
0
void MyDialog::ListAdd(const char * handle,
                        const char * line){

    if (!handleMap[handle])
        std::cout<<"Handle not in layout yet"<<endl;
    else{
        Node * n= handleMap[handle];
        QComboBox * qcb = dynamic_cast<QComboBox*>(n->myWidget);
        QString qst(line);
        qcb->addItem(qst);
    }
}
int DArray_qsort(DArray *array, DArray_compare cmp)
{
  qst(array, cmp, 0, array->end - 1);
  return 0;
}