The function effectively calls rdbuf()->close().
The function fails if no file is currently open (associated) with this object.
On failure, the failbit internal state flag is set (which can be checked with member fail), and depending on the value set with exception an exception may be thrown.
Parameters
noneReturn Value
noneExample
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
|
This example simply opens and closes a file.
Basic template member declaration
( basic_ifstream<charT,traits> ) |
See also
| ifstream::open | Open file (public member function) |
| filebuf::close | Close file (public member function) |
