Closes a file.
int _close( int fd );
- File descriptor referring to open file.
_close returns 0 if the file was successfully closed. A return value of –1 indicates an error, in which case errno is set to EBADF, indicating an invalid file descriptor parameter.
The _close function closes the file associated with fd.
|Routine||Required header||Optional headers||Compatibility|
|_close||<io.h>||<errno.h>||Win 98, Win Me, Win NT, Win 2000, Win XP|
For additional compatibility information, see Compatibility in the Introduction.
All versions of the C run-time libraries.
See the example for _open.