filebuf* close();
This function flushes any waiting output, closes the file, and disconnects the file from the filebuf object. If an error occurs, the function returns NULL and leaves the filebuf object in a closed state. If there is no error, the function returns the address of the filebuf object and clears its error state.