в Builder -ой справке
| Цитата | basic_ifstream(const char* s, ios_base::openmode mode= ios_base::in, long protection= 0666);
Constructs an object of class basic_ifstream<charT,traits>, initializing the base class basic_istream with the associated file buffer, which is initialized by calling the basic_filebuf constructor basic_filebuf<charT,traits>(). The constructor then calls the open function open(s,mode,protection) in order to attach the file, whose name is pointed to by s, to the basic_ifstream object. The third argument protection holds file permissions. It does not appear in the Standard C++ description and is included as an extension. It determines the file read/write/execute permissions under UNIX. It is more limited under DOS since files are always readable and do not have special execute permission.
|
А вот что в исходниках
| Код | template <class _CharT, class _Traits> class basic_ifstream : public basic_istream<_CharT, _Traits> { public: // Types typedef _CharT char_type; typedef typename _Traits::int_type int_type; typedef typename _Traits::pos_type pos_type; typedef typename _Traits::off_type off_type; typedef _Traits traits_type;
typedef basic_ios<_CharT, _Traits> _Basic_ios; typedef basic_istream<_CharT, _Traits> _Base; typedef basic_filebuf<_CharT, _Traits> _Buf;
public: // Constructors, destructor.
basic_ifstream() : basic_ios<_CharT, _Traits>(), basic_istream<_CharT, _Traits>(0), _M_buf() { this->init(&_M_buf); }
explicit basic_ifstream(const char* __s, ios_base::openmode __mod = ios_base::in) : basic_ios<_CharT, _Traits>(), basic_istream<_CharT, _Traits>(0), _M_buf() { this->init(&_M_buf); if (!_M_buf.open(__s, __mod | ios_base::in)) this->setstate(ios_base::failbit); }
# ifndef _STLP_NO_EXTENSIONS explicit basic_ifstream(int __id, ios_base::openmode __mod = ios_base::in) : basic_ios<_CharT, _Traits>(), basic_istream<_CharT, _Traits>(0), _M_buf() { this->init(&_M_buf); if (!_M_buf.open(__id, __mod | ios_base::in)) this->setstate(ios_base::failbit); } # endif
~basic_ifstream() {}
public: // File and buffer operations. basic_filebuf<_CharT, _Traits>* rdbuf() const { return __CONST_CAST(_Buf*,&_M_buf); }
bool is_open() { return this->rdbuf()->is_open(); }
void open(const char* __s, ios_base::openmode __mod = ios_base::in) { if (!this->rdbuf()->open(__s, __mod | ios_base::in)) this->setstate(ios_base::failbit); } .................
|
Заметь ни в одном конструкторе нет 3-го параметра. Видимо он вообще не используется |