Read file-contents into a string in C++
- by sonofdelphi
In scripting languages like Perl, it is possible to read a file into a variable in one shot.
    open(FILEHANDLE,$file);
    $content=<FILEHANDLE>;
What would be the most efficient way to do this in C++?