Click here to Skip to main content
15,892,005 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Show information in the same dialog after press diferent button Pin
antonio3433-Oct-11 8:35
antonio3433-Oct-11 8:35 
GeneralRe: Show information in the same dialog after press diferent button Pin
David Crow3-Oct-11 9:20
David Crow3-Oct-11 9:20 
GeneralRe: Show information in the same dialog after press diferent button Pin
antonio3433-Oct-11 12:13
antonio3433-Oct-11 12:13 
GeneralRe: Show information in the same dialog after press diferent button Pin
antonio3434-Oct-11 1:27
antonio3434-Oct-11 1:27 
Questionpositive values count WHILE heap sort Pin
sadas232341s1-Oct-11 22:51
sadas232341s1-Oct-11 22:51 
AnswerRe: positive values count WHILE heap sort Pin
André Kraak1-Oct-11 22:59
André Kraak1-Oct-11 22:59 
GeneralRe: positive values count WHILE heap sort Pin
sadas232341s2-Oct-11 21:55
sadas232341s2-Oct-11 21:55 
QuestionRe: positive values count WHILE heap sort Pin
David Crow3-Oct-11 7:22
David Crow3-Oct-11 7:22 
Have you tried placing the counting code within either of those other loops to see if it counts what you expect? At first glance, I'd try:

while (0 < right)
{
    temp = arr[left];
    arr[left] = arr[right];
    arr[right] = temp;

    if (0 < arr[right]) 
        PosCount++;
 
    right--;
 
    Sift(arr, left, right);
}

// since the while() loop stops when right==0, you'll need to count one more time here

"One man's wage rise is another man's price increase." - Harold Wilson

"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons

"Show me a community that obeys the Ten Commandments and I'll show you a less crowded prison system." - Anonymous



modified 13-Oct-11 9:39am.

AnswerRe: positive values count WHILE heap sort Pin
sadas232341s3-Oct-11 8:39
sadas232341s3-Oct-11 8:39 
QuestionRe: positive values count WHILE heap sort Pin
David Crow3-Oct-11 9:27
David Crow3-Oct-11 9:27 
QuestionPhysical Drive Size Pin
john56321-Oct-11 22:08
john56321-Oct-11 22:08 
GeneralRe: Physical Drive Size Pin
Code-o-mat1-Oct-11 22:48
Code-o-mat1-Oct-11 22:48 
AnswerRe: Physical Drive Size Pin
Software_Developer2-Oct-11 0:29
Software_Developer2-Oct-11 0:29 
QuestionHow can program tell that itself is running as admin? Pin
Brandon-X120001-Oct-11 3:07
Brandon-X120001-Oct-11 3:07 
AnswerRe: How can program tell that itself is running as admin? Pin
Chris Losinger1-Oct-11 4:10
professionalChris Losinger1-Oct-11 4:10 
GeneralRe: How can program tell that itself is running as admin? Pin
Brandon-X120001-Oct-11 5:38
Brandon-X120001-Oct-11 5:38 
QuestionDatum & Map projection Pin
rajgaurav_jsr1-Oct-11 3:01
rajgaurav_jsr1-Oct-11 3:01 
AnswerRe: Datum & Map projection Pin
Software_Developer1-Oct-11 21:58
Software_Developer1-Oct-11 21:58 
QuestionHow to update the Document generated by server COleServerDoc Pin
Andraw Tang30-Sep-11 10:01
Andraw Tang30-Sep-11 10:01 
QuestionHow can I Move a memory pointer in FILE? Pin
002comp30-Sep-11 2:52
002comp30-Sep-11 2:52 
AnswerRe: How can I Move a memory pointer in FILE? Pin
Code-o-mat30-Sep-11 3:04
Code-o-mat30-Sep-11 3:04 
AnswerRe: How can I Move a memory pointer in FILE? Pin
Madhu Nair30-Sep-11 3:29
Madhu Nair30-Sep-11 3:29 
AnswerRe: How can I Move a memory pointer in FILE? PinPopular
enhzflep30-Sep-11 3:34
enhzflep30-Sep-11 3:34 
GeneralRe: How can I Move a memory pointer in FILE? Pin
Chris Meech30-Sep-11 7:13
Chris Meech30-Sep-11 7:13 
AnswerRe: How can I Move a memory pointer in FILE? PinPopular
Richard MacCutchan30-Sep-11 10:10
mveRichard MacCutchan30-Sep-11 10:10 

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.