Click here to Skip to main content
15,887,746 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: MFC & inner class question... Pin
Alberto_Canabal6-Mar-06 0:06
Alberto_Canabal6-Mar-06 0:06 
GeneralRe: MFC & inner class question... Pin
Blake Miller6-Mar-06 5:36
Blake Miller6-Mar-06 5:36 
AnswerRe: MFC & inner class question... Pin
Chris Losinger3-Mar-06 8:21
professionalChris Losinger3-Mar-06 8:21 
GeneralRe: MFC & inner class question... Pin
Alberto_Canabal6-Mar-06 0:02
Alberto_Canabal6-Mar-06 0:02 
Question[Message Deleted] Pin
johni__boy3-Mar-06 6:33
johni__boy3-Mar-06 6:33 
AnswerRe: a problem by linked list ; help needed Pin
David Crow3-Mar-06 6:38
David Crow3-Mar-06 6:38 
GeneralRe: a problem by linked list ; help needed Pin
johni__boy3-Mar-06 13:30
johni__boy3-Mar-06 13:30 
GeneralRe: a problem by linked list ; help needed Pin
IdUnknown3-Mar-06 17:56
IdUnknown3-Mar-06 17:56 
johni__boy wrote:
The second argument by calling findnumber() is not Null but it is used to access to the structure :


Initially you set entrylist = NULL; so the first time you call the findnumber function the second argument is NULL. So in the findnumber function you should first check to see if the second argument named "list" is NULL, and if it is, you should return NULL.


Now, look at the last two lines of this block and imagine adding the first node into an empty list.

else
{
// no, create new one.
entry = (entry_t*)malloc(sizeof(entry_t));
entry->freq = 1;
entry->number = number;
entry->next = entrylist;
entrylist = entry->next;
}

1. again, initially entrylist is NULL
2. you create a memory block to hold a node and the next pointer is pointing to entrylist which is NULL. ok
3. entrylist should point to entry not entry->next.


I don't know if there are other problems, but that's what I see without compiling the code. You should learn to use breakpoint, the stack trace, and the watch window because these problems can be easily spotted.
AnswerRe: a problem by linked list ; help needed Pin
basementman3-Mar-06 7:24
basementman3-Mar-06 7:24 
AnswerRe: a problem by linked list ; help needed Pin
Stephen Hewitt3-Mar-06 20:19
Stephen Hewitt3-Mar-06 20:19 
QuestionProblem with registering ITTAPIEventNotification interface Pin
bisvl3-Mar-06 5:57
bisvl3-Mar-06 5:57 
QuestionHow do make a FormView without Doc/View Pin
Jethro633-Mar-06 5:49
Jethro633-Mar-06 5:49 
QuestionRe: How do make a FormView without Doc/View Pin
David Crow3-Mar-06 6:07
David Crow3-Mar-06 6:07 
AnswerRe: How do make a FormView without Doc/View Pin
Jethro633-Mar-06 7:15
Jethro633-Mar-06 7:15 
QuestionRe: How do make a FormView without Doc/View Pin
David Crow3-Mar-06 7:20
David Crow3-Mar-06 7:20 
AnswerRe: How do make a FormView without Doc/View Pin
Jethro633-Mar-06 8:36
Jethro633-Mar-06 8:36 
AnswerRe: How do make a FormView without Doc/View Pin
Office Lineman3-Mar-06 14:07
Office Lineman3-Mar-06 14:07 
GeneralRe: How do make a FormView without Doc/View Pin
Jethro6328-Dec-06 5:05
Jethro6328-Dec-06 5:05 
GeneralRe: How do make a FormView without Doc/View Pin
permutations19-Apr-10 13:07
permutations19-Apr-10 13:07 
GeneralRe: How do make a FormView without Doc/View Pin
Rez_Spain6-May-10 23:07
Rez_Spain6-May-10 23:07 
QuestionWhat is IsolatedStorage Pin
Chintoo7233-Mar-06 5:47
Chintoo7233-Mar-06 5:47 
AnswerRe: What is IsolatedStorage Pin
Chintoo7233-Mar-06 5:58
Chintoo7233-Mar-06 5:58 
Questioncopying an array of bytes to another array Pin
chaitanya223-Mar-06 5:24
chaitanya223-Mar-06 5:24 
AnswerRe: copying an array of bytes to another array Pin
RChin3-Mar-06 5:30
RChin3-Mar-06 5:30 
GeneralRe: copying an array of bytes to another array Pin
David Crow3-Mar-06 5:49
David Crow3-Mar-06 5: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.