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

Use getline and >> when read file C++ - Stack Overflow

Your main problem is that you are reading the integers with >> directly from the stream. This combined with reading a string from the stream is a bad idea. Reading the strings removes the new line will reading with >> will not remove the new lines. It is

stackoverflow.com

網址安全性掃描由 google 提供