首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > C++ >

请问filebuf的seekoff有关问题

2012-02-22 
请教filebuf的seekoff问题vc7中的filebuf有人用过吗?basic_filebuf::seekoffRemarksTheprotectedvirtualme

请教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的场合是很少很少的。

热点排行