I am trying to validate user input from the command line with argc and argv but am running into a segmentation fault and am not sure why.
I want to validate the user has
Your main should be
int main(int argc, char*argv[])
And do the check before using on atoi on argv[1]
atoi
argv[1]
Also all paths should return a value. Bung return 0; at the end
return 0;