Click here to Skip to main content
15,905,590 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: A professional and rich-content toolkit for designing great UI Pin
fat_boy20-Jun-12 3:49
fat_boy20-Jun-12 3:49 
GeneralRe: A professional and rich-content toolkit for designing great UI Pin
Albert Holguin20-Jun-12 4:03
professionalAlbert Holguin20-Jun-12 4:03 
GeneralRe: A professional and rich-content toolkit for designing great UI Pin
fat_boy20-Jun-12 6:30
fat_boy20-Jun-12 6:30 
AnswerRe: A professional and rich-content toolkit for designing great UI Pin
Vaclav_20-Jun-12 4:22
Vaclav_20-Jun-12 4:22 
AnswerRe: A professional and rich-content toolkit for designing great UI Pin
bob1697220-Jun-12 10:34
bob1697220-Jun-12 10:34 
QuestionMfc100d.dll Not Found Pin
AmbiguousName19-Jun-12 18:13
AmbiguousName19-Jun-12 18:13 
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 

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.