I need to copy a file into a string. I need someway to preallocate memory for that string object and a way to directly read the file content into that string\'s memory?
std::string::resize() actually allocates the required space.
std::string::resize()
std::string::reserve() may not (it's a request).
std::string::reserve()