#include
#include
#include
#include
#include
int main(int argc, string argv[])
{
if (ar
I believe the problem is in
isdigit (argv[1])
argv[1]
is of type char *
, but isdigit() expects an int
.
If you want to check whether the supplied argument is all-numerical value or not, you have to either
argv[n]
and pass them one by one to isdigit()
check.The error in on line 13, You need to do a
...
13: if (isdigit (atoi(argv[1])) != 0)
...