Exemplo n.º 1
0
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);
  }
}
Exemplo 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);
    }
}
Exemplo n.º 3
0
int DArray_qsort(DArray *array, DArray_compare cmp)
{
  qst(array, cmp, 0, array->end - 1);
  return 0;
}