Quantcast
Channel: Active questions tagged gcc - Stack Overflow
Viewing all articles
Browse latest Browse all 22016

check if fclose() fails and return specific error

$
0
0

So, I tried to find an answer to this question unsuccessfully.

I know what to do and how to manage such a case - by using fluss/NULL etc. afterward. But checking it is tricky to me.

So, basically:

open some file(successfully) - let's call the pointer: file.after some code running...fclose(file);

Now, how can I check after(before it's also an option) closing the file - that it really happened?

What is the condition? By demand, I need to handle this case by printing some specific errors.


Viewing all articles
Browse latest Browse all 22016

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>