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

Trouble reading from file using getline() c++ - Stack Overflow

The problem is that only the last line is printed. Correct? I suggest that you add std::endl in your while loop. It can make the issue more clear.

www.google.com.tw

網址安全性掃描由 google 提供