Code
int main(int argc, char *argv[]){
bool inpVal;
inpVal = checkIfValid(argc, *argv);
}
bool checkIfValid(int clength, char argv[]){
if((clength <= 1) || (clength > 2)){
printf("Invalid Input: Please enter exactly 1 number as a command line argument.\n");
return false;
}
else if(atoi(argv[1]) < 0){
printf("Invalid Input: Please enter non-negative number.\n");
return false;
}
2 questions
1. what is the "*" before argv signify?
2. why does the compiled exe stop working if i get to the else if block? basically i would like to check if the
command line argument is negative and return false if it is
new to c appreciate it if someone would explain this to me