Click here to Skip to main content
15,887,485 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: GCC Linker and Where To Define Structures Pin
Trevor Johansen24-Mar-10 9:22
Trevor Johansen24-Mar-10 9:22 
GeneralRe: GCC Linker and Where To Define Structures Pin
CPallini24-Mar-10 11:33
mveCPallini24-Mar-10 11:33 
GeneralRe: GCC Linker and Where To Define Structures Pin
Trevor Johansen25-Mar-10 13:08
Trevor Johansen25-Mar-10 13:08 
GeneralRe: GCC Linker and Where To Define Structures Pin
CPallini25-Mar-10 21:41
mveCPallini25-Mar-10 21:41 
QuestionHow do you display a bitmap in IE and control navigation? Pin
nstein222-Mar-10 11:57
nstein222-Mar-10 11:57 
AnswerRe: How do you display a bitmap in IE and control navigation? Pin
KarstenK23-Mar-10 4:21
mveKarstenK23-Mar-10 4:21 
QuestionDeleting a single point from a quadtree Pin
Chidori-chan22-Mar-10 9:43
Chidori-chan22-Mar-10 9:43 
AnswerRe: Deleting a single point from a quadtree Pin
Avi Berger22-Mar-10 11:00
Avi Berger22-Mar-10 11:00 
First, you have bugs in your deleteTree implementation.

Chidori-chan wrote:
free (root->children[i]);
deleteTree (root->children[i]);



This is undefined behavior. Once you have freed the child node, it is no longer yours and you must not access it. Reverse the order of these two lines.

There are more problems in your deleteTree implementation as well. I will let you work on finding them.

Perhaps I am wrong here, but I would think that deleting a single point actually means deleting the entire subtree starting from that point. Otherwise, what do you do about all those would be orphaned nodes? So I expected to see a call to deleteTree somewhere in deleteP. I didn't find it.

Also, I would think that you need to traverse the tree to locate the point to be deleted. I would expect that to be the first thing you would have to deal with, but don't see it in your code.
Please do not read this signature.

AnswerRe: Deleting a single point from a quadtree Pin
Richard MacCutchan22-Mar-10 11:07
mveRichard MacCutchan22-Mar-10 11:07 
QuestionRe: Deleting a single point from a quadtree Pin
Chidori-chan23-Mar-10 8:52
Chidori-chan23-Mar-10 8:52 
QuestionRST Template Matching Pin
cherrymotion22-Mar-10 6:20
cherrymotion22-Mar-10 6:20 
AnswerRe: RST Template Matching Pin
Tim Craig22-Mar-10 9:45
Tim Craig22-Mar-10 9:45 
GeneralRe: RST Template Matching Pin
cherrymotion22-Mar-10 11:05
cherrymotion22-Mar-10 11:05 
GeneralRe: RST Template Matching Pin
Tim Craig22-Mar-10 13:48
Tim Craig22-Mar-10 13:48 
GeneralRe: RST Template Matching Pin
cherrymotion23-Mar-10 11:18
cherrymotion23-Mar-10 11:18 
GeneralRe: RST Template Matching Pin
Tim Craig23-Mar-10 12:53
Tim Craig23-Mar-10 12:53 
GeneralRe: RST Template Matching Pin
cherrymotion25-Mar-10 6:46
cherrymotion25-Mar-10 6:46 
QuestionModeless dialog frame sizing in MFC MDI Pin
Vaclav_22-Mar-10 3:38
Vaclav_22-Mar-10 3:38 
AnswerRe: Modeless dialog frame sizing in MFC MDI Pin
KarstenK22-Mar-10 5:00
mveKarstenK22-Mar-10 5:00 
GeneralRe: Modeless dialog frame sizing in MFC MDI Pin
Vaclav_22-Mar-10 6:02
Vaclav_22-Mar-10 6:02 
Questionlarger toolbar images Pin
josip cagalj22-Mar-10 1:12
josip cagalj22-Mar-10 1:12 
AnswerRe: larger toolbar images Pin
mesajflaviu22-Mar-10 8:55
mesajflaviu22-Mar-10 8:55 
GeneralRe: larger toolbar images Pin
josip cagalj22-Mar-10 23:27
josip cagalj22-Mar-10 23:27 
AnswerRe: larger toolbar images Pin
josip cagalj24-Mar-10 3:05
josip cagalj24-Mar-10 3:05 
Questionmaking a modelessdialog box as modal Pin
narayanagvs22-Mar-10 1:06
narayanagvs22-Mar-10 1:06 

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.