After inputing some characters, I need to press enter twice to make the characters printed. why?
Code:#include <iostream> #include <string> using namespace std; int main() { string text_word; while ( getline(cin, text_word) ) cout<<text_word<<endl; return 0; }