http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vclang98/html/_iostream_fstream.3a3a.open.aspnProtThe file protection specification; defaults to the static integer filebuf::openprot, which is equivalent to the operating system default, filebuf::sh_compat, under MS-DOS. The possible nProt values are as follows: * filebuf::sh_compat Compatibility share mode (MS-DOS only). * filebuf::sh_none Exclusive mode no sharing. * filebuf::sh_read Read sharing allowed. * filebuf::sh_write Write sharing allowed. The filebuf::sh_read and filebuf::sh_write modes can be combined with the logical OR ( || ) operator.
可以先seekg 到末尾
然后tellg