Basically using strtol to check for unsuccessful conversions, I am using the function
width = (int) strtol(argv[2], NULL, 10);
if (errno != 0) {
printf("Please parse integer argument");
}
using errno.h
It works when the arguments are characters, i.e.: argv[2] = e, 6, etic But this fails to catch errors when arguments like 444r or 33f (leading numbers followed by characters) are supplied? Is there something I am missing?