 |
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 |
 |