how to reuse stringstream

前端 未结 6 1151
遇见更好的自我
遇见更好的自我 2021-01-03 22:12

These threads do NOT answer me:

resetting a stringstream

How do you clear a stringstream variable?

        std::ifstream file( szFIleName_p )         


        
6条回答
  •  鱼传尺愫
    2021-01-03 22:35

    If you have the stream in a class member, use unique_ptr, then just reset(new stringstream(...)) to reuse it.

提交回复
热议问题