C++: Difference between revisions
| Line 191: | Line 191: | ||
[https://insanecoding.blogspot.com/2011/11/how-to-read-in-file-in-c.html Reference and comparison of different methods] | [https://insanecoding.blogspot.com/2011/11/how-to-read-in-file-in-c.html Reference and comparison of different methods] | ||
<syntaxhighlight lang="C++"> | <syntaxhighlight lang="C++"> | ||
#include <cerrno> | |||
#include <fstream> | #include <fstream> | ||
#include <string> | #include <string> | ||
std::string get_file_contents(const std::string &filename) | std::string get_file_contents(const std::string &filename) | ||