Custom 1 MB file stream buffers?
The code below may, or may not, end up in the LZW article I'm currently working on.
I need you to tell me if this is stupid, and if so, why. Thanks.
const std::size_t one_mb = 1024 * 1024; // one megabyte
const std::unique_pointer<char> custom_buffer(new char[one_mb]);
std::fstream f; // must set the custom buffer before opening the file
f.open("file.txt", std::ios_base::in | std::ios_base::binary);
Topic archived. No new replies allowed.