I've spent entire night and day searching on the internet how to solve my problem, and i couldn't find anything... so please help me, if you know :(
this is piece of my code:
int main ()
{
string line;
cout<<"Welcome!"<<endl;
getline(cin, line);
while (line!="0")
{
hello (line);
getline(cin, line);
}
return 0;
}
as you can see i didn't use getline for stream input and i don't plan on using only one string. but the problem is that every time i write something i have to press enter twice, for the program to react. nothing is wrong with the function hello. so how do i fix this, so i don't have to press enter twice? and yes i tried putting the '\n'. doesn't work