读书人

请问filebuf的seekoff有关问题

发布时间: 2012-02-22 19:36:55 作者: rapoo

请教filebuf的seekoff问题
vc7中的filebuf有人用过吗?
basic_filebuf::seekoff
Remarks
The protected virtual member function endeavors to alter the current positions for the controlled streams

我在程序中使用编译就要抱错
error C2248: 'std::basic_filebuf <_Elem,_Traits> ::seekoff ' : cannot access protected member declared in class 'std::basic_filebuf <_Elem,_Traits> '
那么该怎么解决呢?

[解决办法]
没用过。
出错提示是楼主使用了basic_filebuf类的保护函数。
[解决办法]
类的保护函数不能直接在外面调用
[解决办法]
说说难道原始需求吧。要自己写streambuf的场合是很少很少的。

读书人网 >C++

热点推荐