Click here to Skip to main content
15,867,594 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: How to pass pointers and process them using ellipsis ? Pin
Richard MacCutchan19-Mar-22 6:11
mveRichard MacCutchan19-Mar-22 6:11 
Questionworking with pointers Pin
Calin Negru17-Mar-22 21:48
Calin Negru17-Mar-22 21:48 
AnswerRe: working with pointers Pin
Victor Nijegorodov17-Mar-22 23:16
Victor Nijegorodov17-Mar-22 23:16 
GeneralRe: working with pointers Pin
Calin Negru18-Mar-22 0:12
Calin Negru18-Mar-22 0:12 
GeneralRe: working with pointers Pin
Victor Nijegorodov18-Mar-22 1:39
Victor Nijegorodov18-Mar-22 1:39 
GeneralRe: working with pointers Pin
Calin Negru18-Mar-22 10:20
Calin Negru18-Mar-22 10:20 
Generalgoing a bit further: working with pointers Pin
Calin Negru20-Mar-22 7:47
Calin Negru20-Mar-22 7:47 
AnswerRe: working with pointers Pin
Mircea Neacsu18-Mar-22 10:19
Mircea Neacsu18-Mar-22 10:19 
Just a few more things on top of what Victor said:

1. Typically the chaining structure comes before the payload (the data part). That allows you to have different sizes of objects in your list without having to modify the list management code.

2. Again in the typical case, the function that creates or extends the list (BuildList function in your example) receives a structure containing the list head and tail. That way you can easily add new elements at either end and this is the most common operation.

3. In general you should be very, very, very sure that you need to use a linked list. Linked lists perform poorly because they don't make good use of cache. For a longer discussion about this see Bjarne Stroustrup: Why you should avoid Linked Lists - YouTube[^] and also Are lists evil? -- Bjarne Stroustrup : Standard C++[^].
Mircea

QuestionRe: working with pointers Pin
David Crow21-Mar-22 3:16
David Crow21-Mar-22 3:16 
AnswerRe: working with pointers Pin
Calin Negru21-Mar-22 5:15
Calin Negru21-Mar-22 5:15 
QuestionCode to Figure out x,y cords for CDC::Pie inside an CDC::Ellipse given % Pin
ForNow13-Mar-22 9:37
ForNow13-Mar-22 9:37 
AnswerRe: Code to Figure out x,y cords for CDC::Pie inside an CDC::Ellipse given % Pin
Mircea Neacsu14-Mar-22 16:41
Mircea Neacsu14-Mar-22 16:41 
GeneralRe: Code to Figure out x,y cords for CDC::Pie inside an CDC::Ellipse given % Pin
ForNow15-Mar-22 5:01
ForNow15-Mar-22 5:01 
QuestionIPv6 address compression code using vc++ Pin
Member 1252773510-Mar-22 17:12
Member 1252773510-Mar-22 17:12 
AnswerRe: IPv6 address compression code using vc++ Pin
Victor Nijegorodov10-Mar-22 21:06
Victor Nijegorodov10-Mar-22 21:06 
QuestionQuestions about EM_SETWORDBREAKPROC message and EDITWORDBREAKPROCA function Pin
ForNow10-Mar-22 6:02
ForNow10-Mar-22 6:02 
AnswerRe: Questions about EM_SETWORDBREAKPROC message and EDITWORDBREAKPROCA function Pin
RedDk10-Mar-22 8:22
RedDk10-Mar-22 8:22 
GeneralRe: Questions about EM_SETWORDBREAKPROC message and EDITWORDBREAKPROCA function Pin
ForNow10-Mar-22 9:35
ForNow10-Mar-22 9:35 
GeneralRe: Questions about EM_SETWORDBREAKPROC message and EDITWORDBREAKPROCA function Pin
RedDk10-Mar-22 9:40
RedDk10-Mar-22 9:40 
AnswerRe: Questions about EM_SETWORDBREAKPROC message and EDITWORDBREAKPROCA function Pin
Richard MacCutchan10-Mar-22 22:19
mveRichard MacCutchan10-Mar-22 22:19 
GeneralRe: Questions about EM_SETWORDBREAKPROC message and EDITWORDBREAKPROCA function Pin
ForNow11-Mar-22 1:41
ForNow11-Mar-22 1:41 
GeneralRe: Questions about EM_SETWORDBREAKPROC message and EDITWORDBREAKPROCA function Pin
Richard MacCutchan11-Mar-22 1:51
mveRichard MacCutchan11-Mar-22 1:51 
GeneralRe: Questions about EM_SETWORDBREAKPROC message and EDITWORDBREAKPROCA function Pin
ForNow11-Mar-22 2:13
ForNow11-Mar-22 2:13 
GeneralRe: Questions about EM_SETWORDBREAKPROC message and EDITWORDBREAKPROCA function Pin
Richard MacCutchan11-Mar-22 3:49
mveRichard MacCutchan11-Mar-22 3:49 
GeneralRe: Questions about EM_SETWORDBREAKPROC message and EDITWORDBREAKPROCA function Pin
ForNow11-Mar-22 4:08
ForNow11-Mar-22 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.