c++ - How to seek stream pointer of a memory mapped file(using boost)? -
i mapped file memory using boost::iostreams::mapped_file_source
, declared stream read file boost::iostreams::stream <boost::iostreams::mapped_file_source> streamreader
.
it worked fine , able parse memory mapped file. used getline
read entire file , stored offsets file. while performing operation able utilize seekg
seek streamreader desired position. 1 time whole file read, cannot seek streamreader anywhere.
streamreader.fail()
returns true. streamreader clears pointer 1 time reaches end of file?
is there way can go desired file offset after reading entire file?
thankyou
i think should phone call clear()
method of stream reset state.
see http://www.cplusplus.com/reference/ios/ios/clear/
c++ visual-studio-2010 boost seek
No comments:
Post a Comment