# std::basic_ifstream< _CharT, _Traits > Class Template Reference

List of all members.

## Public Methods

| basic_ifstream ()
| basic_ifstream (const char *__s, ios_base::openmode __mode=ios_base::in)
| Create an input file stream. More...
__filebuf_type * | rdbuf () const
| Get a pointer to the file stream's buffer. More...
void | close ()

## Detailed Description

### template<typename _CharT, typename _Traits>
class std::basic_ifstream< _CharT, _Traits >

Derivation of general input streams, specific to files.

Definition at line 296 of file fstream.

## Constructor & Destructor Documentation

template<typename _CharT, typename _Traits>
std::basic_ifstream< _CharT, _Traits >::basic_ifstream | ( |  | ) | `[inline]`

| Default constructor. Create an input file stream. Definition at line 316 of file fstream.

template<typename _CharT, typename _Traits>
std::basic_ifstream< _CharT, _Traits >::basic_ifstream | ( | const char * | __s,
|  | ios_base::openmode | __mode = ios_base::in
| ) | `[inline, explicit]`

Create an input file stream.

Parameters:

  s | Null terminated string specifying filename.
  mode | Open file in specified mode (see std::ios_base).

Tip: When using std::string to hold the filename, you must use .c_str() before passing it to this constructor.

Definition at line 329 of file fstream.

## Member Function Documentation

template<typename _CharT, typename _Traits>
void std::basic_ifstream< _CharT, _Traits >::close | ( |  | ) | `[inline]`

| Close the file. Definition at line 360 of file fstream.

template<typename _CharT, typename _Traits>
__filebuf_type* std::basic_ifstream< _CharT, _Traits >::rdbuf | ( |  | ) | const`[inline]`

Get a pointer to the file stream's buffer.

Returns:
  Pointer to basic_filebuf.

Definition at line 345 of file fstream.

The documentation for this class was generated from the following file:

- fstream