EDN Admin
Well-known member
I m trying to convert VS6 project to VC2005. I m getting almost 99 errors and trying to fix them one by one. But i got stuck for this error and could not proceed further. <br/> <br/> This is the error:<br/> //-----------------------------------------------------------<br/> 1>c
rogram filesmicrosoft visual studio 8vcincludeistream(842) : error C2248: std::basic_ios<_Elem,_Traits>::basic_ios : cannot access private member declared in class std::basic_ios<_Elem,_Traits><br/> 1> with<br/> 1> [<br/> 1> _Elem=char,<br/> 1> _Traits=std::char_traits<char><br/> 1> ]<br/> 1> c
rogram filesmicrosoft visual studio 8vcincludeios(151) : see declaration of std::basic_ios<_Elem,_Traits>::basic_ios<br/> 1> with<br/> 1> [<br/> 1> _Elem=char,<br/> 1> _Traits=std::char_traits<char><br/> 1> ]<br/> 1> This diagnostic occurred in the compiler generated function std::basic_istream<_Elem,_Traits>::basic_istream(const std::basic_istream<_Elem,_Traits> &)<br/> 1> with<br/> 1> [<br/> 1> _Elem=char,<br/> 1> _Traits=std::char_traits<char><br/> 1> ]<br/> //-----------------------------------------------------------------------------------------<br/> <br/> My class:---------------------------CDxfFile.h<br/> class CDxfFile <br/> {<br/> protected:<br/> std::istream m_is; //!< Stream used for reading<br/> ---<br/> }<br/> I have a constructor:---------------------CDxfFile.cpp<br/> CDxfFile::CDxfFile( std::istream &is) : m_is(is)<br/> {<br/> m_nLineNumber = 0;<br/> }<br/> <br/> and calling it as :------------------xyz.cpp<br/> bool CDxfReader::Read(std::istream &is, bool (*EnitityCallback)(CDxfEntity *))<br/> {<br/> CDxfFile dxfFile(is);<br/> ----<br/> }<br/> <br/> //-----------------------------------------------------------------------------------------<br/> <br/> <br/> I googled and got some information. the error says that somwhere in the code i m passing iostream variable as value and not by reference. I checked my code and changed all calls by value with call by reference. Is there anything else that i have look in to.<br/> Any help will be appreciated. <br/> Thanks in advance<br/> Narendra
View the full article


View the full article