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

Read text file into string. C++ ifstream - Stack Overflow

To read a whole line from a file into a string, use std::getline like so: std::ifstream file("my_file"); std::string temp; std::getline(file, temp); You can do this in a loop to until the end of the file like so: std::ifstream file("my_file"); std::string

stackoverflow.com

網址安全性掃描由 google 提供