Questions tagged «ofstream»

8
在C ++中使用ifstream逐行读取文件
file.txt的内容是: 5 3 6 4 7 1 10 5 11 6 12 3 12 4 哪里 5 3坐标对。如何在C ++中逐行处理此数据? 我可以获取第一行,但是如何获取文件的下一行? ifstream myfile; myfile.open ("text.txt");
612 c++  file-io  ofstream 
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.