Click here to Skip to main content
16,004,882 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: fast qsort implementation Pin
Mohammad A Gdeisat21-Jan-08 12:09
Mohammad A Gdeisat21-Jan-08 12:09 
GeneralRe: fast qsort implementation Pin
Stephen Hewitt21-Jan-08 12:12
Stephen Hewitt21-Jan-08 12:12 
GeneralRe: fast qsort implementation Pin
Mohammad A Gdeisat21-Jan-08 12:14
Mohammad A Gdeisat21-Jan-08 12:14 
GeneralRe: fast qsort implementation Pin
Stephen Hewitt21-Jan-08 12:17
Stephen Hewitt21-Jan-08 12:17 
GeneralRe: fast qsort implementation Pin
Stephen Hewitt21-Jan-08 12:22
Stephen Hewitt21-Jan-08 12:22 
GeneralRe: fast qsort implementation Pin
Mohammad A Gdeisat21-Jan-08 12:24
Mohammad A Gdeisat21-Jan-08 12:24 
GeneralRe: fast qsort implementation Pin
Mohammad A Gdeisat21-Jan-08 13:28
Mohammad A Gdeisat21-Jan-08 13:28 
GeneralRe: fast qsort implementation Pin
David Crow21-Jan-08 15:47
David Crow21-Jan-08 15:47 
What does the following yield:

void qsort( int a[], int lo, int hi )
{
    int low = lo;
    int high = hi;
    int mid = a[(low + high) / 2];
 
    do
    {
        while (a[low] < mid) low++;
        while (a[high] > mid) high--;
 
        if (low <= high)
        {
            swap(a[low], a[high]);
            low++
            high--
        }
    } while (low <= high);
 
    if (high > lo) qsort(a, lo, high);
    if (low < hi) qsort(a, low, hi);
}


"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman

"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne


GeneralRe: fast qsort implementation Pin
Mohammad A Gdeisat22-Jan-08 2:32
Mohammad A Gdeisat22-Jan-08 2:32 
GeneralConstructor help – getting data from CListView to dialog. Pin
Vaclav_21-Jan-08 6:27
Vaclav_21-Jan-08 6:27 
QuestionRe: Constructor help – getting data from CListView to dialog. Pin
CPallini21-Jan-08 7:37
mveCPallini21-Jan-08 7:37 
GeneralRe: Constructor help – getting data from CListView to dialog. Pin
Vaclav_21-Jan-08 7:52
Vaclav_21-Jan-08 7:52 
QuestionRe: Constructor help – getting data from CListView to dialog. Pin
CPallini21-Jan-08 9:56
mveCPallini21-Jan-08 9:56 
GeneralRe: Constructor help – getting data from CListView to dialog. Pin
Vaclav_21-Jan-08 13:10
Vaclav_21-Jan-08 13:10 
QuestionRe: Constructor help – getting data from CListView to dialog. Pin
CPallini21-Jan-08 22:03
mveCPallini21-Jan-08 22:03 
GeneralRe: Constructor help – getting data from CListView to dialog. Pin
Vaclav_22-Jan-08 5:12
Vaclav_22-Jan-08 5:12 
General[Solved?] Constructor help – getting data from CListView to dialog. Pin
Vaclav_22-Jan-08 12:06
Vaclav_22-Jan-08 12:06 
GeneralRe: [Solved?] Constructor help – getting data from CListView to dialog. Pin
Mike Danberg23-Jan-08 19:17
Mike Danberg23-Jan-08 19:17 
GeneralCalling a function Pin
newkid21-Jan-08 4:05
newkid21-Jan-08 4:05 
GeneralWrong forum Pin
CPallini21-Jan-08 4:21
mveCPallini21-Jan-08 4:21 
GeneralError in Release build (Shift Operator) Pin
Sumanta Rout21-Jan-08 3:14
Sumanta Rout21-Jan-08 3:14 
GeneralRe: Error in Release build (Shift Operator) Pin
David Crow21-Jan-08 3:36
David Crow21-Jan-08 3:36 
GeneralRe: Error in Release build (Shift Operator) Pin
Alexander M.,21-Jan-08 3:42
Alexander M.,21-Jan-08 3:42 
GeneralRe: Error in Release build (Shift Operator): is it actually a C++ compiler bug? Pin
CPallini21-Jan-08 4:04
mveCPallini21-Jan-08 4:04 
GeneralRe: Error in Release build (Shift Operator) Pin
CPallini21-Jan-08 5:04
mveCPallini21-Jan-08 5:04 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.