isdigit works with characters. It tells you whether the character in question corresponds to a digit, like '0', '1', '2', ..., '9'. Those are very different from the actual numbers 0 through 9 (note the lack of single quotes). Take a look at an ASCII chart (link) to get some insight into the difference, particularly notice the discrepancy between the Dec and Chr columns. I am guessing when the user enters '7', you want 7, but you are actually getting decimal 55, thus the compare doesn't work.
You can also put the following line of code in there, to see the difference:
Code:
printf("The character entered was '%c', it's numeric value is %d\n", c, c);
A quick fix:
Code:
if (isdigit(c)) {
c -= '0'; // now c has been "translated" from it's ASCII value to a "regular" number
...
if (search->messageNum == c) // this should now work as expected
}