Click here to Skip to main content
15,923,087 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralMFC Application with DTML GUI Pin
blueinred10-Oct-03 13:11
blueinred10-Oct-03 13:11 
GeneralRe: MFC Application with DTML GUI Pin
Scozturk10-Oct-03 22:16
professionalScozturk10-Oct-03 22:16 
GeneralTab Ctrl!! Pin
kannada10-Oct-03 13:02
kannada10-Oct-03 13:02 
QuestionHow to create sounds Pin
Deepak Samuel10-Oct-03 13:02
Deepak Samuel10-Oct-03 13:02 
AnswerRe: How to create sounds Pin
John M. Drescher10-Oct-03 13:38
John M. Drescher10-Oct-03 13:38 
GeneralRe: How to create sounds Pin
Scozturk10-Oct-03 22:12
professionalScozturk10-Oct-03 22:12 
Generallinked list problem Pin
K. Shaffer10-Oct-03 12:09
K. Shaffer10-Oct-03 12:09 
GeneralRe: linked list problem Pin
Phil Hamer10-Oct-03 12:24
Phil Hamer10-Oct-03 12:24 
The CApproach object returned from ParseApproach is a temporary object. You're passing the address of this temporary to Insert. When the temporary object is destroyed automatically the pointer to it points to garbage. You can either let Insert take a copy of a CApproach object instead of a pointer:

<br />
int PrintList::Insert(CApproach approach)<br />


or you can assign the result of ParseApproach to a local variable, but keep in mind that when that variable goes out of scope, the pointer to it will point to garbage:

<br />
CApproach result = ParseApproach(codestring);<br />
list->Insert(&result);<br />
list->print();<br />


You could also pass Insert a pointer to an object allocated on the heap, but you have to remember to delete it when you're done with it.
GeneralRe: linked list problem Pin
John M. Drescher10-Oct-03 13:19
John M. Drescher10-Oct-03 13:19 
GeneralOpen and Read a PS/2 port (mouse) Pin
asd175310-Oct-03 11:50
asd175310-Oct-03 11:50 
GeneralThis is not visual, nor C++ Pin
totig10-Oct-03 11:13
totig10-Oct-03 11:13 
GeneralRe: This is not visual, nor C++ Pin
ZoogieZork10-Oct-03 11:40
ZoogieZork10-Oct-03 11:40 
GeneralRe: This is not visual, nor C++ Pin
Paul Oss10-Oct-03 11:51
Paul Oss10-Oct-03 11:51 
GeneralRe: This is not visual, nor C++ Pin
W. Hammer -sledge-10-Oct-03 20:53
W. Hammer -sledge-10-Oct-03 20:53 
GeneralCEditView problem Pin
aplamon10-Oct-03 11:07
aplamon10-Oct-03 11:07 
GeneralRe: CEditView problem Pin
Anthony_Yio10-Oct-03 22:46
Anthony_Yio10-Oct-03 22:46 
QuestionAnyone used groupware of some kind? Pin
JWood10-Oct-03 9:54
JWood10-Oct-03 9:54 
AnswerRe: Anyone used groupware of some kind? Pin
Ravi Bhavnani10-Oct-03 10:17
professionalRavi Bhavnani10-Oct-03 10:17 
GeneralRe: Anyone used groupware of some kind? Pin
Michael Dunn10-Oct-03 13:56
sitebuilderMichael Dunn10-Oct-03 13:56 
QuestionCRichEdit problem??? Pin
Ph@ntom10-Oct-03 9:28
Ph@ntom10-Oct-03 9:28 
GeneralMaking the transition from Win API SDK to MFC Pin
Kayembi10-Oct-03 9:15
Kayembi10-Oct-03 9:15 
GeneralRe: Making the transition from Win API SDK to MFC Pin
Ravi Bhavnani10-Oct-03 10:26
professionalRavi Bhavnani10-Oct-03 10:26 
GeneralRe: Making the transition from Win API SDK to MFC Pin
Kayembi11-Oct-03 8:50
Kayembi11-Oct-03 8:50 
GeneralCPropertyPage Title Pin
act_x10-Oct-03 8:48
act_x10-Oct-03 8:48 
GeneralRe: CPropertyPage Title Pin
PJ Arends10-Oct-03 8:59
professionalPJ Arends10-Oct-03 8:59 

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.