heya guys
i am having a little problem with isdigit in C++ even though i have used it in the past in C
the situation is very simple.
someone types in values in an integer array.
i use a loop and go through each element and check if its a digit. even though they are all integers it sitll returns false :(
heres the code
thanks :)Code:
int checkAlpha (const student x)
{
for (int i = 0; i < NumLabGrades; i++)
{
if (x.lab_grade[i] < 0 || x.lab_grade[i] > 25) return 0;
if (!(isdigit (x.lab_grade[i]))) return 0;
}
return 1;
}