C++: Reading CSV file into struct array

前端 未结 2 918
梦如初夏
梦如初夏 2020-12-22 03:53

I am working on an assignment where I need to read a CSV file of unknown number of lines into an structured array. Only via C++, not C (they don\'t want us to combine both).

2条回答
  •  遥遥无期
    2020-12-22 04:15

    Your file pointer is at the end of the file after the while loop to determine the amount of lines. As I see it you've got the clear and reset the file pointer. This link might help you: http://www.cplusplus.com/forum/beginner/11564/

提交回复
热议问题