请问一下这道题目怎么做,多方查找无果,非常感谢
使用find泛型算法在一个list链表中查找数据我才大一没学到C++,但我一高中同学问我了,我答应帮她查的,拜托了
map<string,int> stringCounts; string str; while( cin >> str ) ++stringCounts[str]; map<string,int>::iterator iter = stringCounts.find("spoon"); if( iter != stringCounts.end() ) { cout << "You typed '" << iter->first << "' " << iter->second << " time(s)" << endl; }