Apologies for the basic question; I'm relatively new to C++.
I've looked around and seen many different suggestions for how to read from a file to a char array. For example, this one creates a char array of size 10000, but this is suboptimal (either wasted space, or not enough space).
What's the simplest, and most commonly used method for reading from a file to a string, or string-like sequence? This is such a common operation; there's got to be a standard way to do it. Is there no one-liner for this?