I am in a situation where I had a loop, and every time he reads a line, but I do not know how to read empty input. If the user does not enter anything and gets into enter, he remains there.
I want to read this as a string and go to the next input below is the code
int times = 4;
while(times--)
{
string str;
cin>>str;
---then some other code to play with the string---
}
source
share