Sorry if this is a question covered before but I'm having a torid time trying to get an fstream to behave. Essentially when I embed the code snipet below into a program, and give it a file to load, the stream stops loading after 62987 bytes are read in. It claims to have encountered an end of file, however I've tried it with a number of files, including plain text ones, and if they are greater than this value in size, it fails to load. Please help ?
Expand|Select|Wrap|Line Numbers
- strstreambuf tmpbuf;
- iostream bufferedStrm(&tmpbuf);
- ifstream strm(lc_strFileName.GetBuffer(lc_strFileName.GetLength()),ios::in|ios::binary);
- if (!strm.fail())
- {
- bufferedStrm.operator <<(strm.rdbuf());
- }
A little more background to platform, I'm running on an XP box, developing under Visual Studio C++ .Net. Any help would be greatly appreciated.
Regards
Neil.