ifstream ifs("demo.txt"); stringstream buffer; buffer << ifs.rdbuf(); string strTemp= buffer.str(); ifs.close();
评论区