it's a for loop, in it i put a if statement, but i don't know how to judge whether it's a blank line.
And is it right i just strike the return key to make a blank line?
1 2 3 4 5 6
for (int i = 0; i < size; ++i)
{
cin >> x[i];
if (...)//what to put inside ()
break;
}
If it is a char*, you have no hope of ever doing it - it is completely impossible. I'm being serious - there is no way to know how much the user will type in so you can not know how large to make the buffer.