I have used this bit of code before without problems, however, when using it now, i'm getting the error listed in the title...
I don't see anything wrong with it.. any help?
Code:
//Prompting user for Input file//
while(resp == 'Y' || resp == 'y'){
printf("Please enter the file you'd like to read from: ");
scanf("%s", fileInName);
if((fopen(fileInName, "r")) == NULL){
printf("Could not open requested file. Would you like to enter another file? [Y/N]: ");
scanf("%*c %c", &resp);
}
else {
inFile = fopen(fileInName, "r");
break;
}
if(resp == 'n' || resp == 'N')
exit(1);
}