anyways i have this small problem i cant seem to understand
i have this code below
what the above does is if a digit is pressed when the program is runCode:if( isdigit(c)) { MsgNode *search; search = list; while(search!=NULL){ if( search->messageNum == c) currentItem=search; search=search->next; }
it is supposed to look through the nodes in the Linked Lists and specifically in the nodes struct access a data which holds the node number in the linked list, and compare it with the number which was inputed and stored in c
c is a char because it can also take character options for the menu when program is run
now the pointer to the node currentItem is supposed to be the one to store the pointer to that node in the Linked list which has that number in its data
no matter what i do, i dont get any results, what am i missing here?
i know for sure the data is there, but for some reason the if condition always fails



LinkBack URL
About LinkBacks



