Hey guys
I have some problem in my c++ program
hope you guys can give a hand
--------------------------------------------------------------------------------------------------------
do
printf("Please key in the number of passenger >>");
scanf("%s" , &no_passenger_check);
if (strlen(no_passenger_check)>3)
{
repeat = 1;
}else
{
if (isdigit(no_passenger_check[0,1,2]))
{
repeat = 0;
}
else
{
repeat = 1;
}
}
}while (repeat == 1);
---------------------------------------------------------------------------------
I wanna ask that is this (isdigit(no_passenger_check[0,1,2])) correct?
because I just want to check whether that the first three alphanumeric input that I entered is digit or not?
Is it correct?