C++ - repeatedly using istringstream

前端 未结 2 1698
夕颜
夕颜 2020-11-29 08:43

I have a code for reading files with float numbers on line stored like this: \"3.34|2.3409|1.0001|...|1.1|\". I would like to read them using istringstream, but it doesn\'t

2条回答
  •  长情又很酷
    2020-11-29 09:03

    You need to add a separate.clear(); line after separate.str(row) to clear the status bits, otherwise the eofbit gets set and subsequent reads fail.

提交回复
热议问题