why the second cin didn't execute?
#include<iostream>
#include<algorithm>
#include<string>
#include<list>
using namespace std;
int main()
{
string s;
list<string> l;
cout << "input string:" << endl;
while (cin >> s)
l.push_back(s);
cout << "input the string will be found:" << endl;
cin.ignore(1024);
string str;
cin >> str;
auto n = count(l.begin(), l.end(), str);
cout << str << " " << "occurs" << " " << n << " " << "times!" << endl;
return 0;
}