Sep 17, 2011 at 4:44pm UTC
Hi I am new to programming. I have a problem with the following while loop.
I want the loop to break when it gets two or three "ENTER" input from keyboard simultaneously.
char data[100];
while(!cin.get())
{
cin.get(data,100).get();
cout<<data;
}
This doesn't work. What's the problem? What should I do? How can I use cin.get() or cin.getline() here? I don't want to use string or pointer here.
Sep 17, 2011 at 6:55pm UTC
seems like nobody is interested to answer this question.
Sep 17, 2011 at 6:57pm UTC
Well, I didn't answer because I have no idea what you mean by
I want the loop to break when it gets two or three "ENTER" input from keyboard simultaneously.
I also don't know why you have so many gets there.
Last edited on Sep 17, 2011 at 6:58pm UTC