Click here to Skip to main content
15,896,201 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Mfc100d.dll Not Found Pin
Richard MacCutchan19-Jun-12 20:59
mveRichard MacCutchan19-Jun-12 20:59 
AnswerRe: Mfc100d.dll Not Found Pin
Sivaraman Dhamodharan19-Jun-12 22:39
Sivaraman Dhamodharan19-Jun-12 22:39 
GeneralRe: Mfc100d.dll Not Found Pin
ThatsAlok20-Jun-12 20:20
ThatsAlok20-Jun-12 20:20 
GeneralRe: Mfc100d.dll Not Found Pin
Sivaraman Dhamodharan21-Jun-12 1:23
Sivaraman Dhamodharan21-Jun-12 1:23 
AnswerRe: Mfc100d.dll Not Found Pin
Albert Holguin20-Jun-12 3:23
professionalAlbert Holguin20-Jun-12 3:23 
AnswerRe: Mfc100d.dll Not Found Pin
Brandon-X1200021-Jun-12 21:41
Brandon-X1200021-Jun-12 21:41 
QuestionC structs dynamic vs local stack Pin
Bacchus Beale19-Jun-12 16:16
Bacchus Beale19-Jun-12 16:16 
AnswerRe: C structs dynamic vs local stack Pin
Chris Losinger19-Jun-12 16:47
professionalChris Losinger19-Jun-12 16:47 
unless you know your tree will never exceed a certain number of nodes, you will most certainly have to use some kind of dynamic memory allocation (ex. malloc).

but...

in getResponse:
struct thing2 tmp2 = getThing2();
struct thing1 tmp1 = getThing1();
struct thing1 *p1 = &tmp1;
struct thing2 *p2 = &tmp2;


tmp1 and tmp2 are going to go out of scope when the function exits, so p1 and p2 are going to be pointing at garbage.

the malloc version works because those dynamically allocated structs still exist after the function exits.

AnswerRe: C structs dynamic vs local stack Pin
fat_boy20-Jun-12 1:32
fat_boy20-Jun-12 1:32 
AnswerRe: C structs dynamic vs local stack Pin
Albert Holguin20-Jun-12 4:13
professionalAlbert Holguin20-Jun-12 4:13 
AnswerRe: C structs dynamic vs local stack Pin
jschell20-Jun-12 8:38
jschell20-Jun-12 8:38 
QuestionVideo Player Win32->Animate Pin
MarcoXIII19-Jun-12 11:35
MarcoXIII19-Jun-12 11:35 
AnswerRe: Video Player Win32->Animate Pin
Vaclav_19-Jun-12 11:46
Vaclav_19-Jun-12 11:46 
QuestionProperty Sheets & Pages questions Pin
DeepT19-Jun-12 10:06
DeepT19-Jun-12 10:06 
AnswerRe: Property Sheets & Pages questions Pin
Chris Losinger19-Jun-12 12:39
professionalChris Losinger19-Jun-12 12:39 
GeneralRe: Property Sheets & Pages questions Pin
DeepT20-Jun-12 2:21
DeepT20-Jun-12 2:21 
QuestionRe: Property Sheets & Pages questions Pin
David Crow20-Jun-12 2:34
David Crow20-Jun-12 2:34 
AnswerRe: Property Sheets & Pages questions Pin
DeepT20-Jun-12 2:36
DeepT20-Jun-12 2:36 
QuestionUpdating CPropertyPage Pin
Vaclav_19-Jun-12 5:59
Vaclav_19-Jun-12 5:59 
QuestionRe: Updating CPropertyPage Pin
David Crow19-Jun-12 7:02
David Crow19-Jun-12 7:02 
AnswerRe: Updating CPropertyPage Pin
Vaclav_19-Jun-12 7:48
Vaclav_19-Jun-12 7:48 
GeneralRe: Updating CPropertyPage Pin
David Crow19-Jun-12 8:03
David Crow19-Jun-12 8:03 
GeneralSOLVED : Updating CPropertyPage Pin
Vaclav_19-Jun-12 11:40
Vaclav_19-Jun-12 11:40 
SuggestionRe: SOLVED : Updating CPropertyPage Pin
David Crow20-Jun-12 2:38
David Crow20-Jun-12 2:38 
GeneralRe: SOLVED : Updating CPropertyPage Pin
Vaclav_20-Jun-12 4:08
Vaclav_20-Jun-12 4:08 

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.