I\'m new to C and I\'m thinking how to write this function myself. I take a parameter from command line, so it is stored in argv array and I want to decide whether it is or
I'm not sure if you want to check if it's a number or a digit and argv[1] is of type char * not int so you should do something like that:
bool isDigit(char *param)
{
return (*param >= `0` && *param <= `9`)
}
bool isNumber(char *param)
{
while (param)
{
if (!isDigit(param))
return false;
param++;
}
return true;
}