c++中ifstream一次讀取整個文件[轉載]

c++中一次讀取整個文件的內容的方法:html 讀取至char*的狀況 std::ifstream t; int length; t.open("file.txt"); // open input file t.seekg(0, std::ios::end); // go to the end length = t.tellg(); // report location (this is the
相關文章
相關標籤/搜索