📅  最后修改于: 2022-03-11 14:44:45.436000             🧑  作者: Mango
#include
#include
int main(int argc, char** argv)
{
std::ifstream ifs("myfile.txt");
std::string content( (std::istreambuf_iterator(ifs) ),
(std::istreambuf_iterator() ) );
return 0;
}