阅读背景:

[C++] map .first .second_限量发行的专栏_c++ first second

来源:互联网 

#include <iostream>
#include <map>
using namespace std;
 
int main()
{
     map<string, int> words;
     for(string s; cin >> s;)
         ++words[s];
     for(const auto& p :words)
         cout << p.first << ": " << p.second << "\n";
}
#include <iostream>
#include <map>
using names



你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: