Click here to Skip to main content
15,895,990 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
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 
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 
Bacchus Beale wrote:
since I would need to be sure it has all been freed.


So create the following functionality.
1. Measure the tree needed.
2. Alloc that size - one single alloc.
3. Create the structs, including pointers within that single allocated block.

When you are done with the tree then there is only one allocation to delete.

Your functions would look something like the following. Correct pointer arithematic provides pointer values.

int SizeOfThing2();
void SetupThing2(struct thing2* dst, char* word, struct thing1* s1);
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 
GeneralRe: SOLVED : Updating CPropertyPage Pin
David Crow20-Jun-12 4:12
David Crow20-Jun-12 4:12 
GeneralRe: SOLVED : Updating CPropertyPage Pin
Vaclav_20-Jun-12 8:36
Vaclav_20-Jun-12 8:36 
General3 Integer store with Bit Storage Pin
sheronici19-Jun-12 5:26
sheronici19-Jun-12 5:26 

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.