📅  最后修改于: 2022-03-11 14:44:50.341000             🧑  作者: Mango
// Read Entire File Into a String Variable
// More Info: https://stackoverflow.com/a/116177/7573706
ifstream myFile("stuff.txt");
string str(std::istreambuf_iterator{myFile}, {});
Requirements:
#include
#include
#include
#include