countif http://www.cplusplus.com/reference/algorithm/count_if/
摘要:
// count_if example#include <iostream>#include <algorithm>#include <vector>using namespace std;bool IsOdd (int i) { return ((i%2)==1); }int main () { int mycount; vector<int> myvector; for (int i=1; i<10; i++) myvector.push_back(i); // myvector: 1 2 3 4 5 6 7 8 9 mycount = 阅读全文
posted @ 2011-07-29 22:40 more think, more gains 阅读(152) 评论(0) 推荐(0) 编辑