as simple as this
after entering the following : "Goerge Bush" I hit ENTER key...which should then displayCode:#include<iostream> #include<string> using namespace std ; int main () { string str; cout << "Please enter full name: "; getline (cin,str); cout << "Thank you, " << str << ".\n"; return 0; }
right ??Well it doesnt..what happens is following:Code:Thank you, George Bush
after entering George Bush and hitting the "ENTER" key the cursor just jumps to the next line WHERE I AM ABLE TO ENTER ANOTHER FULL NAME.Upon hitting ENTER the second time the name "George Bush" is displayed (however not the second name ;not that i want to enter a second person)
How is it that i get to input anything after hitting ENTER the first time...this never happened before