Get each value from a string via std::ifstream

后端 未结 1 1919
说谎
说谎 2021-01-27 08:08

I am try to use an ifstream with the while loop to get each value. However, when I try it, nothing happens. Why?

std::string line;
std::getline(cin         


        
相关标签:
1条回答
  • 2021-01-27 08:53

    You must use an istringstream, not an ifstream.

    0 讨论(0)
提交回复
热议问题