2013年10月13日

Accelerated C++ Chapter7 使用关联式容器

摘要: Chapter7 使用关联式容器7.2 字数统计程序 1 int main() 2 { 3 string s; 4 map counters; 5 6 while(cin >> s) 7 ++counters[s]; 8 for(map::const_iterator it = counters.begin(); 9 it != counters.end(); ++it)10 {11 cout first second << endl;12 }13 14 return 0;15 } 阅读全文

posted @ 2013-10-13 23:20 startfromjava 阅读(147) 评论(0) 推荐(0)

导航