Click here to Skip to main content
15,890,932 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: application messaging Pin
Code-o-mat8-May-11 9:35
Code-o-mat8-May-11 9:35 
Questionlzma on GPU Pin
crotaphiticus7-May-11 20:12
crotaphiticus7-May-11 20:12 
AnswerRe: lzma on GPU Pin
Code-o-mat8-May-11 6:22
Code-o-mat8-May-11 6:22 
GeneralRe: lzma on GPU Pin
crotaphiticus8-May-11 7:54
crotaphiticus8-May-11 7:54 
GeneralRe: lzma on GPU Pin
Code-o-mat8-May-11 9:39
Code-o-mat8-May-11 9:39 
GeneralRe: lzma on GPU Pin
crotaphiticus8-May-11 12:33
crotaphiticus8-May-11 12:33 
Questionabout multi linked list Pin
quartaela7-May-11 9:44
quartaela7-May-11 9:44 
AnswerRe: about multi linked list Pin
Luc Pattyn7-May-11 10:26
sitebuilderLuc Pattyn7-May-11 10:26 
I'm sorry to say but the concept has been fundamentally flawed from the start. What you want is something that behaves like a single collection ("persons"), to which you can add and remove; and which you can iterate in a couple of ways (first name A-Z, last name A-Z, first name Z-A, last name Z-A).

So you should implement that as a single list, with the one ADD method and the one REMOVE method, not multiples of them. And your ADD, REMOVE and possible other methods should all take care of all the sort orders and links themselves all the time. So ADD should accept one new node and update all relevant link chains; REMOVE likewise.

As long as you don't do it that way, it will be open to abuse; as in your user calling add_fn_Node() and not calling add_ln_Node().

BTW: one more piece of advice. Assuming the nodes are small, I very much prefer not to have a LIST structure at all, I just use one more NODE item. That is, my list is a NODE, its next field points to the first node, and the forward link chain ends on the last node, which has a next value of null); likewise my list NODE's prev field points to the last node, and the backward link chain ends on the first node, which has a prev value of null. Doing it that way takes less code, as there are no special cases, a list never being empty! (it always contains itself, the list NODE, which you obviously have to skip when enumerating the real nodes).

Smile | :)
Luc Pattyn [Forum Guidelines] [My Articles] Nil Volentibus Arduum
Please use <PRE> tags for code snippets, they preserve indentation, improve readability, and make me actually look at the code.

GeneralRe: about multi linked list Pin
quartaela7-May-11 11:09
quartaela7-May-11 11:09 
GeneralRe: about multi linked list Pin
barneyman7-May-11 15:53
barneyman7-May-11 15:53 
GeneralRe: about multi linked list Pin
quartaela8-May-11 3:41
quartaela8-May-11 3:41 
GeneralRe: about multi linked list Pin
barneyman8-May-11 3:51
barneyman8-May-11 3:51 
QuestionMSVCR100.dll error, debugger_hook_dummy = 0 Pin
mikael.peterson6-May-11 22:59
mikael.peterson6-May-11 22:59 
AnswerRe: MSVCR100.dll error, debugger_hook_dummy = 0 Pin
Luc Pattyn7-May-11 2:28
sitebuilderLuc Pattyn7-May-11 2:28 
GeneralRe: MSVCR100.dll error, debugger_hook_dummy = 0 Pin
mikael.peterson7-May-11 23:18
mikael.peterson7-May-11 23:18 
AnswerRe: MSVCR100.dll error, debugger_hook_dummy = 0 Pin
kellymac10-Jan-12 12:20
kellymac10-Jan-12 12:20 
QuestionProblem Opening Email when using InvokeHelper in C++ Pin
Member 29729926-May-11 5:00
Member 29729926-May-11 5:00 
AnswerRe: Problem Opening Email when using InvokeHelper in C++ Pin
Richard MacCutchan6-May-11 5:36
mveRichard MacCutchan6-May-11 5:36 
GeneralRe: Problem Opening Email when using InvokeHelper in C++ Pin
Member 29729926-May-11 6:15
Member 29729926-May-11 6:15 
GeneralRe: Problem Opening Email when using InvokeHelper in C++ Pin
Richard MacCutchan6-May-11 23:01
mveRichard MacCutchan6-May-11 23:01 
GeneralRe: Problem Opening Email when using InvokeHelper in C++ Pin
Member 29729926-May-11 23:11
Member 29729926-May-11 23:11 
GeneralRe: Problem Opening Email when using InvokeHelper in C++ Pin
Richard MacCutchan7-May-11 0:33
mveRichard MacCutchan7-May-11 0:33 
GeneralRe: Problem Opening Email when using InvokeHelper in C++ Pin
Member 29729927-May-11 2:07
Member 29729927-May-11 2:07 
GeneralRe: Problem Opening Email when using InvokeHelper in C++ Pin
Richard MacCutchan7-May-11 5:22
mveRichard MacCutchan7-May-11 5:22 
AnswerRe: Problem Opening Email when using InvokeHelper in C++ Pin
barneyman7-May-11 15:23
barneyman7-May-11 15:23 

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.