hello,
i'm not really sure if the problem lies in isdigit, what I do know is that it isn't doing it's job.
this is basicly a small function I made to see if the user input is what I expected. in that if, i change the bool to false, which should cause it to exit the while.Code:char ErrorControl(char op,char line1[],char line2[],char line3[],char line4[],char line5[]){
bool sure=true;
int op_int,times=0;
while(sure){
op_int=op -'0';
printf("%d",op_int);
if((isdigit(op)) || (op_int>10)){
printf("test");
sure=false;
}
else {
printf("\nInvalid Option!\nInput option: ");
scanf("%c",&op);
fflush(stdin);
times++;
if(times==3) {
system("cls");
times=0;
}
printf("%s %s %s %s %s",line1,line2,line3,line4,line5);
}
}
return op;
}
I ran out of ideas of what could cause this...
Thanks