Hello there, I need to do some file I/O(mainly reading) on a very large file(>3GB), can someone suggest the best way to do so? I want to do in C++.
~calvin
Hello there, I need to do some file I/O(mainly reading) on a very large file(>3GB), can someone suggest the best way to do so? I want to do in C++.
~calvin
Duplicate: http://stackoverflow.com/questions/1035657/seeking-and-reading-large-files-in-a-linux-c-application
http://stackoverflow.com/questions/293672/reading-files-larger-than-4gb-using-c-stl
Just make sure you can process the file in chunks of a manageable size.
For example, read in 100K into memory, process it, discard it, read in the next 100K.