This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]