basic_ifstream::open
파일을 엽니다.
void open(
const char *_Filename,
ios_base::openmode _Mode = ios_base::in,
int _Prot = (int)ios_base::_Openprot
);
void open(
const char *_Filename,
ios_base::openmode _Mode
);
void open(
const wchar_t *_Filename,
ios_base::openmode _Mode = ios_base::in,
int _Prot = (int)ios_base::_Openprot
);
void open(
const wchar_t *_Filename,
ios_base::openmode _Mode
);
매개 변수
_Filename
The name of the file to open._Mode
One of the enumerations in ios_base::openmode._Prot
The default file opening protection, equivalent to the shflag parameter in _fsopen, _wfsopen.
설명
The member function calls rdbuf -> open(_Filename, _Mode | ios_base::in). If open fails, the function calls setstate(failbit), which may throw an ios_base::failure exception.
예제
See basic_filebuf::open for an example that uses open.
요구 사항
Header: <fstream>
네임스페이스: std