Click here to Skip to main content
15,884,739 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: 'x' bit OS Pin
Pranit Kothari1-May-11 3:14
Pranit Kothari1-May-11 3:14 
GeneralRe: 'x' bit OS Pin
Pranit Kothari10-May-11 22:40
Pranit Kothari10-May-11 22:40 
GeneralRe: 'x' bit OS Pin
«_Superman_»10-May-11 22:59
professional«_Superman_»10-May-11 22:59 
Questionproblem Pin
hmaz462930-Apr-11 23:49
hmaz462930-Apr-11 23:49 
AnswerRe: problem Pin
Rajesh R Subramanian1-May-11 0:01
professionalRajesh R Subramanian1-May-11 0:01 
AnswerRe: problem Pin
«_Superman_»1-May-11 2:16
professional«_Superman_»1-May-11 2:16 
Questionlinked list adding operation with two structure type Pin
quartaela30-Apr-11 3:42
quartaela30-Apr-11 3:42 
AnswerRe: linked list adding operation with two structure type Pin
Luc Pattyn30-Apr-11 4:22
sitebuilderLuc Pattyn30-Apr-11 4:22 
Sure it goes wrong, as this statement
while ( (*list)->current != NULL ) (*list)->current = (*list)->current->fn_next;

is bound to result in (*list)->current being zero/null, hence the following
(*list)->current->fn_next=...

will bomb.

Some ideas:

1.
if you want to add a node at the end of the list, and your data structures have a tail member, why not use it, rather than scanning the list?

2.
try not to have special cases. When done properly, one often does not need them. And when one does, try making the alternate paths as short as possible, they tend to have common things (such as return, and count++ of which you forgot one).

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: linked list adding operation with two structure type Pin
quartaela30-Apr-11 5:13
quartaela30-Apr-11 5:13 
AnswerRe: linked list adding operation with two structure type Pin
Luc Pattyn30-Apr-11 5:36
sitebuilderLuc Pattyn30-Apr-11 5:36 
AnswerRe: linked list adding operation with two structure type Pin
Andrew Phillips30-Apr-11 5:17
Andrew Phillips30-Apr-11 5:17 
GeneralRe: linked list adding operation with two structure type Pin
quartaela30-Apr-11 5:35
quartaela30-Apr-11 5:35 
GeneralRe: linked list adding operation with two structure type Pin
Andrew Phillips30-Apr-11 5:59
Andrew Phillips30-Apr-11 5:59 
AnswerRe: linked list adding operation with two structure type Pin
Luc Pattyn30-Apr-11 6:10
sitebuilderLuc Pattyn30-Apr-11 6:10 
GeneralRe: linked list adding operation with two structure type Pin
quartaela30-Apr-11 8:03
quartaela30-Apr-11 8:03 
GeneralRe: linked list adding operation with two structure type Pin
Luc Pattyn30-Apr-11 8:10
sitebuilderLuc Pattyn30-Apr-11 8:10 
GeneralRe: linked list adding operation with two structure type Pin
quartaela30-Apr-11 8:16
quartaela30-Apr-11 8:16 
GeneralRe: linked list adding operation with two structure type Pin
quartaela30-Apr-11 8:20
quartaela30-Apr-11 8:20 
GeneralRe: linked list adding operation with two structure type Pin
Luc Pattyn30-Apr-11 8:32
sitebuilderLuc Pattyn30-Apr-11 8:32 
QuestionProblem in Callback function in Client Application [modified] Pin
manoharbalu30-Apr-11 1:27
manoharbalu30-Apr-11 1:27 
AnswerRe: Problem in Callback function in Client Application Pin
Hans Dietrich30-Apr-11 4:27
mentorHans Dietrich30-Apr-11 4:27 
QuestionIs there any way to SendMessage to a Button control Pin
lamparded30-Apr-11 1:27
lamparded30-Apr-11 1:27 
AnswerRe: Is there any way to SendMessage to a Button control Pin
«_Superman_»30-Apr-11 2:12
professional«_Superman_»30-Apr-11 2:12 
GeneralRe: Is there any way to SendMessage to a Button control Pin
lamparded30-Apr-11 3:27
lamparded30-Apr-11 3:27 
AnswerRe: Is there any way to SendMessage to a Button control Pin
Hans Dietrich30-Apr-11 4:18
mentorHans Dietrich30-Apr-11 4:18 

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.