Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Zortech C++ 3.0r4 - <b>filebuf::close</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
filebuf::close

Usage

   #include <fstream.hpp>
   filebuf *filebuf::close();

Description

   Any output held in the put area is flushed to the file. The file is then
   closed, and the filebuf marked as unattached (file descriptor == EOF). If
   an error occurs, the error state will be set, and close will return zero.
   Otherwise it returns a pointer to the cfilebuf object.

Example 

   filebuf fb;

   int fd = open(...);
   fb.attach(fd);
   ...;

   if (!fb.close())
       // error

   fd = open(...);
   fb.attach(fd);

Return Value

   Pointer to the filebuf object for which it was called, or zero on error.





Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson