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

C / C++ / MFC

 
GeneralRe: Too-narrow popup menu using LoadMenuIndirect&TrackPopupMenu Pin
Lianqing18-Oct-09 14:34
Lianqing18-Oct-09 14:34 
GeneralRe: Too-narrow popup menu using LoadMenuIndirect&TrackPopupMenu Pin
«_Superman_»18-Oct-09 17:53
professional«_Superman_»18-Oct-09 17:53 
Questionusing cout i get symbols instead address [Solved] Pin
Tadysas18-Oct-09 4:19
Tadysas18-Oct-09 4:19 
AnswerRe: using cout i get symbols instead address Pin
Cedric Moonen18-Oct-09 4:44
Cedric Moonen18-Oct-09 4:44 
AnswerRe: using cout i get symbols instead address Pin
Mircea Puiu18-Oct-09 4:49
Mircea Puiu18-Oct-09 4:49 
GeneralRe: using cout i get symbols instead address [solved] Pin
Tadysas18-Oct-09 7:36
Tadysas18-Oct-09 7:36 
Questionhow to release space of link nodes recursively? Pin
jianzhuhuai17-Oct-09 14:38
jianzhuhuai17-Oct-09 14:38 
AnswerRe: how to release space of link nodes recursively? Pin
Stuart Dootson17-Oct-09 15:10
professionalStuart Dootson17-Oct-09 15:10 
It's because you try to delete a[1], which hasn't been allocated using new. This happens in erase - erase(a) will call erase(a->next). As a->next is a[1], this is equivalent to erase(a[1]).

In addition, you would need to delete a with the array deleter, but it will be deleted in erase, with the scalar deleter.

Try changing the code in main to:

Node*a=new Node;
a->x=5;
a->next=new Node;
a->next->next=0;
erase(a);


Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p

GeneralRe: how to release space of link nodes recursively? Pin
jianzhuhuai18-Oct-09 23:10
jianzhuhuai18-Oct-09 23:10 
GeneralRe: how to release space of link nodes recursively? Pin
Stuart Dootson19-Oct-09 0:32
professionalStuart Dootson19-Oct-09 0:32 
GeneralRe: how to release space of link nodes recursively? Pin
jianzhuhuai20-Oct-09 0:43
jianzhuhuai20-Oct-09 0:43 
QuestionHelp with a Function related with Circular Linked List Pin
Naumf17-Oct-09 12:30
Naumf17-Oct-09 12:30 
AnswerRe: Help with a Function related with Circular Linked List Pin
«_Superman_»17-Oct-09 13:08
professional«_Superman_»17-Oct-09 13:08 
GeneralRe: Help with a Function related with Circular Linked List Pin
Naumf18-Oct-09 3:00
Naumf18-Oct-09 3:00 
QuestionRe: Help with a Function related with Circular Linked List Pin
David Crow17-Oct-09 16:53
David Crow17-Oct-09 16:53 
AnswerRe: Help with a Function related with Circular Linked List Pin
Naumf18-Oct-09 3:04
Naumf18-Oct-09 3:04 
AnswerRe: Help with a Function related with Circular Linked List Pin
David Crow18-Oct-09 13:03
David Crow18-Oct-09 13:03 
GeneralRe: Help with a Function related with Circular Linked List Pin
Naumf19-Oct-09 8:05
Naumf19-Oct-09 8:05 
GeneralRe: Help with a Function related with Circular Linked List Pin
David Crow19-Oct-09 8:09
David Crow19-Oct-09 8:09 
GeneralRe: Help with a Function related with Circular Linked List Pin
Naumf19-Oct-09 8:15
Naumf19-Oct-09 8:15 
QuestionAccessing synch object in DirectDraw Pin
Code-o-mat17-Oct-09 12:16
Code-o-mat17-Oct-09 12:16 
Questionhow to draw in a dialog's client area, but from an event ocurred in another dialog? Pin
timbk17-Oct-09 10:53
timbk17-Oct-09 10:53 
AnswerRe: how to draw in a dialog's client area, but from an event ocurred in another dialog? Pin
Hans Dietrich17-Oct-09 18:45
mentorHans Dietrich17-Oct-09 18:45 
GeneralRe: how to draw in a dialog's client area, but from an event ocurred in another dialog? Pin
timbk18-Oct-09 5:46
timbk18-Oct-09 5:46 
Questionalphanumaric and numeric checking Pin
Omegaclass17-Oct-09 10:22
Omegaclass17-Oct-09 10:22 

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.