so i have an array of files stored in a FILE* and need to check if they exist. if they dont, i want to print an error, but i dont know how to get the name which i want for the error message
A FILE* doesn't necessarily map to a file (example: stdout) and therefore may not have a "name". So I'm pretty sure there's no way to get the filename from a FILE*.
Why are you using C FILE * when you could be using C++ file streams or, better yet, Boost?
im doing it in c/assembly. its good learning. there was a lot that i took for granted and didnt realize (like function overloading)
A FILE* doesn't necessarily map to a file (example: stdout) and therefore may not have a "name". So I'm pretty sure there's no way to get the filename from a FILE*.