Click here to Skip to main content
15,889,931 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionMy Heap implementation is not working...please have a look frnds.. Pin
pavarathyRock5-Jul-09 5:03
pavarathyRock5-Jul-09 5:03 
AnswerRe: My Heap implementation is not working...please have a look frnds.. Pin
Iain Clarke, Warrior Programmer5-Jul-09 6:31
Iain Clarke, Warrior Programmer5-Jul-09 6:31 
AnswerRe: My Heap implementation is not working...please have a look frnds.. Pin
harold aptroot5-Jul-09 7:54
harold aptroot5-Jul-09 7:54 
GeneralRe: My Heap implementation is not working...please have a look frnds.. Pin
pavarathyRock6-Jul-09 5:22
pavarathyRock6-Jul-09 5:22 
GeneralRe: My Heap implementation is not working...please have a look frnds.. Pin
harold aptroot6-Jul-09 5:30
harold aptroot6-Jul-09 5:30 
GeneralRe: My Heap implementation is not working...please have a look frnds.. Pin
pavarathyRock6-Jul-09 6:11
pavarathyRock6-Jul-09 6:11 
GeneralRe: My Heap implementation is not working...please have a look frnds.. Pin
harold aptroot6-Jul-09 6:44
harold aptroot6-Jul-09 6:44 
AnswerRe: My Heap implementation is not working...please have a look frnds.. Pin
David Crow5-Jul-09 11:46
David Crow5-Jul-09 11:46 
pavarathyRock wrote:
void MyHeap::Max_heapify(int * array, int index, int length)
{
int left = ((2 * index) + 1);
int right = ((2 * index) + 2);
...


The first time Max_heapify() is called, left equals 11 and right equals 12.

pavarathyRock wrote:
if ((left <= length) && (array[left] > array[index]))


left is then used to access array, which is indexed 0-9.

"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown

"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


Questionint in CListBox Pin
prithaa5-Jul-09 3:47
prithaa5-Jul-09 3:47 
AnswerRe: int in CListBox Pin
Sarath C5-Jul-09 4:26
Sarath C5-Jul-09 4:26 
GeneralRe: int in CListBox Pin
prithaa5-Jul-09 4:51
prithaa5-Jul-09 4:51 
GeneralRe: int in CListBox Pin
Sarath C5-Jul-09 5:16
Sarath C5-Jul-09 5:16 
GeneralRe: int in CListBox Pin
prithaa5-Jul-09 5:53
prithaa5-Jul-09 5:53 
QuestionDialog Box won't Resize Larger Pin
Tom Hubin4-Jul-09 22:21
Tom Hubin4-Jul-09 22:21 
AnswerRe: Dialog Box won't Resize Larger Pin
PJ Arends5-Jul-09 6:52
professionalPJ Arends5-Jul-09 6:52 
QuestionMemory Issues in developing 64 bit Driver in “Windows 64 bit standard edition” ? Pin
ta_isr4-Jul-09 22:01
ta_isr4-Jul-09 22:01 
QuestionRace Condition Pin
SNI4-Jul-09 20:53
SNI4-Jul-09 20:53 
AnswerRe: Race Condition Pin
killabyte5-Jul-09 1:57
killabyte5-Jul-09 1:57 
AnswerRe: Race Condition Pin
David Crow5-Jul-09 11:53
David Crow5-Jul-09 11:53 
AnswerRe: Race Condition Pin
Alexander M.,6-Jul-09 13:52
Alexander M.,6-Jul-09 13:52 
QuestionPlease help me please Pin
aashu44-Jul-09 20:51
aashu44-Jul-09 20:51 
AnswerRe: Please help me please Pin
molesworth4-Jul-09 22:28
molesworth4-Jul-09 22:28 
GeneralRe: Please help me please Pin
aashu45-Jul-09 4:26
aashu45-Jul-09 4:26 
GeneralRe: Please help me please Pin
Still learning how to code5-Jul-09 5:02
Still learning how to code5-Jul-09 5:02 
GeneralRe: Please help me please Pin
molesworth5-Jul-09 12:39
molesworth5-Jul-09 12:39 

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.