I enter the words in one line through the console. Next, displays everything except the first word. How to display the full line?
int main(int argc, const char * argv[]) { char str[100]; cout << "Enter the string: "; (cin >> str).get(); cin.getline(str, 100); cout << str; getch(); }
(cin >> str).get();What is this for? - Alexey Sarovsky