[Solved] How to force getline() to input one line at a time [duplicate]


int n;
cin >> n;
cin.ignore(); // are you sure you tried this?

for(int i = 0; i < n; i++) {
    string input;
    getline(cin, input);
    cout << "Line Entered: " << input << endl;
}

0

solved How to force getline() to input one line at a time [duplicate]