int main()
{
string a, b;
cin >> a;
// cin.ignore(10000, '\n');
getline(cin, b); // in this case, it wouldn't ignore the \n, so it would just terminate without taking the input
cout << a << endl;
cout << b << endl;
}
My question is specifically on why '\n' is left in the input stream, and the rules regarding cin and getline(), regarding white spaces and delimiters.