错误信息如题所示。
修改前:
template<
typename _CharT,
typename _Traits = std::char_traits<_CharT>
>
class BasicStkIos
: virtual public std::basic_ios<_CharT, _Traits>
{
public:
typedef basic_stkbuf <_CharT,_Traits> StkBufType; BasicStkIos()
: mBuf()
{init(&mBuf) ;}; BasicStkIos(const char* fName, std::ios::openmode m, const char* pFilter)
: mBuf(fName, m, pFilter)
{ init(&mBuf) ; } StkBufType*
rdbuf()
{ return &mBuf; } protected:
StkBufType mBuf;
};
修改后:
template<
typename _CharT,
typename _Traits = std::char_traits<_CharT>
>
class BasicStkIos
: virtual public std::basic_ios<_CharT, _Traits>
{
public:
typedef basic_stkbuf <_CharT,_Traits> StkBufType; BasicStkIos()
: mBuf()
{this->init(&mBuf) ;}; BasicStkIos(const char* fName, std::ios::openmode m, const char* pFilter)
: mBuf(fName, m, pFilter)
{ init(&mBuf) ; } StkBufType*
rdbuf()
{ return &mBuf; } protected:
StkBufType mBuf;
};