This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Rdbuf method of fstream
- From: "Ajay Bansal" <Ajay_Bansal at infosys dot com>
- To: "GCC-Help" <gcc-help at gcc dot gnu dot org>
- Date: Wed, 26 Feb 2003 12:22:55 +0530
- Subject: Rdbuf method of fstream
Hi All
My code has something as follows
filebuf *m_fbMember1 = NULL;
fstream iostrm;
m_fbMember1->open("/tmp/ajay1", (ios_base::openmode)op | ios::out);
Iostrm.rdbuf(m_fbMember1);
Is it correct?? I get the following error
../../../Ajay.cpp:184: no matching function for call to `
std::basic_fstream<char, std::char_traits<char>
>::rdbuf(std::filebuf*&)'
/usr/local/include/c++/3.2.1/fstream:525: candidates are:
std::basic_filebuf<_CharT, _Traits>* std::basic_fstream<_CharT,
_Traits>::rdbuf() const [with _CharT = char, _Traits =
std::char_traits<char>]
TIA
Ajay