經安全檢測,此網站為安全網站,請放心前往原始網址!

c++ - How to read line by line or a whole text file at once? - Stack Overflow

You can use std::getline: #include #include int main() { std::ifstream file("Read.txt"); std::string str; while (std::getline(file, str)) { // Process str } } Also note that it's better you just construct the file stream with the file names in it's ...

stackoverflow.com

網址安全性掃描由 google 提供