I am trying to get a integer value from argv[1]
.
I want to know what happens if the user inputs a character so that I can avoid it. I tried '\0' and currently this doesn't work.
int main(int argc, char* argv[]){
int MAX_SIZE;
MAX_SIZE=atoi(argv[1]);
while(MAX_SIZE=='\0'){
printf("plz input in correct format: ");
scanf("%d", &MAX_SIZE);}
Any help would be appreciated.