I have a
std::string (char *, std::string::size_t )
constructor failing and I am not sure why.
For my small test file there was no problem, but when using
with an unsigned int sz of 1Gb (1073741824)
(I think that I used a pos_type 1st time)
and the resulting char* memblock
I first compare against gcount to confirm that sz isnt bigger.
Have I got an overflow problem max_size() returns 4Gb as expected?
Or is it a problem with the file data?
The main problem that I have is that I am trying to chop a very big file (25Gb) xml into manageable chunks. So I loaded the file in 1Gb
chunks and wrote them straight out using ifstream read() and ofstream write(). So my files might not be in the state that I think they are and might be missing an end of file.
I made a small 260k file in the same way that works fine.
Can I access the file to chop it on html tags in Windows XP.
P.S. the 25Gb is wikipedia text only