Click here to Skip to main content
16,006,493 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Finding Windows installation directory Pin
Eytukan29-Jan-06 2:50
Eytukan29-Jan-06 2:50 
QuestionAgain CListBox Pin
hanno2528-Jan-06 6:15
hanno2528-Jan-06 6:15 
AnswerRe: Again CListBox Pin
PJ Arends28-Jan-06 9:55
professionalPJ Arends28-Jan-06 9:55 
AnswerRe: Again CListBox Pin
Eytukan28-Jan-06 17:17
Eytukan28-Jan-06 17:17 
AnswerRe: Again CListBox Pin
Laxman929-Jan-06 17:43
Laxman929-Jan-06 17:43 
Questionmemcpy Pin
Anthony988728-Jan-06 6:06
Anthony988728-Jan-06 6:06 
AnswerRe: memcpy Pin
Chris Losinger28-Jan-06 6:12
professionalChris Losinger28-Jan-06 6:12 
AnswerRe: memcpy Pin
Roland Pibinger28-Jan-06 7:54
Roland Pibinger28-Jan-06 7:54 
Chris Losinger wrote:
you could do : memcpy(&destStruct, &sourceStruct, sizeof(int) * 2);
but that's only good if the stuff you want to skip is on the end of the struct.


It probably works but the code is not safe and portable. The only guarantee is that the first data member and the struct have the same address (no virtual functions involved).

-- modified at 5:18 Sunday 29th January, 2006

A portable solution is:
memcpy(&destStruct, &sourceStruct, offsetof (TEMP, y) + sizeof(int));

QuestionLoading list elements in a CListBox Pin
hanno2528-Jan-06 5:37
hanno2528-Jan-06 5:37 
AnswerRe: Loading list elements in a CListBox Pin
Owner drawn29-Jan-06 18:04
Owner drawn29-Jan-06 18:04 
QuestionWhat's wrong with my map engine? Pin
Lord Kixdemp28-Jan-06 4:35
Lord Kixdemp28-Jan-06 4:35 
QuestionProblems with a trayicon popup menu Pin
428828-Jan-06 3:51
428828-Jan-06 3:51 
AnswerRe: Problems with a trayicon popup menu Pin
Owner drawn29-Jan-06 18:06
Owner drawn29-Jan-06 18:06 
GeneralRe: Problems with a trayicon popup menu Pin
428829-Jan-06 19:05
428829-Jan-06 19:05 
GeneralRe: Problems with a trayicon popup menu Pin
Owner drawn30-Jan-06 16:50
Owner drawn30-Jan-06 16:50 
QuestionMS DataGrid Control 6 - Find Selected Row & Read Cell Values Pin
sdancer7528-Jan-06 3:07
sdancer7528-Jan-06 3:07 
QuestionNumber of Children in a Particular Node Pin
kandukuri27-Jan-06 23:53
kandukuri27-Jan-06 23:53 
AnswerRe: Number of Children in a Particular Node Pin
Stephen Hewitt28-Jan-06 0:43
Stephen Hewitt28-Jan-06 0:43 
GeneralRe: Number of Children in a Particular Node Pin
kandukuri28-Jan-06 3:56
kandukuri28-Jan-06 3:56 
GeneralRe: Number of Children in a Particular Node Pin
Stephen Hewitt28-Jan-06 18:06
Stephen Hewitt28-Jan-06 18:06 
GeneralRe: Number of Children in a Particular Node Pin
kandukuri28-Jan-06 22:01
kandukuri28-Jan-06 22:01 
QuestionMDI Without menu Pin
bantisk27-Jan-06 23:24
bantisk27-Jan-06 23:24 
AnswerRe: MDI Without menu Pin
Joey Bloggs28-Jan-06 2:40
Joey Bloggs28-Jan-06 2:40 
GeneralRe: MDI Without menu Pin
bruspark9-Apr-06 23:28
bruspark9-Apr-06 23:28 
GeneralRe: MDI Without menu Pin
Joey Bloggs10-Apr-06 19:49
Joey Bloggs10-Apr-06 19:49 

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.