I am opening multiple files in a while loop using fopen in C and want to be able to check if any of them will return an error. Relevant code:
int i;
for(i=0; i<10; i++) {
file=fopen(myList[i], "r");
}
How will I know if the file I'm currently looking at will have an error when I attempt to open it or while I am reading it?