Now these two Question are same to mine and Answers to them is For windows ctrl-z for Unix ctrl-D. But they don't work on my Clion IDE, So I am asking this Question.
c++ when will while(cin>>s) stop
How to signify no more input for string ss in the loop while (cin >> ss)
Code
#include <iostream>
int main()
{
    std::string str;
    while(std::cin>>str)
    {
    }
    return 0;
}
Works fine but I find it's just infinite loop.
