Read whole ASCII file into C++ std::string - Stack Overflow

Read whole ASCII file into C++ std::string - Stack Overflow

瀏覽:1189
日期:2025-11-14
I need to read a whole file into memory and place it in a C++ std::string. If I were to read it into a char[], the answer would be very simple: std::ifstream t; int length; t.open("file ......看更多