我这哪里错了
lnklo 2010-01-09 09:45:48 #include <iostream>
#include <algorithm>
#include <string>
#include <vector>
using namespace std;
class GT
{
int b;
public:
GT(int v=0):b(v){}
bool operator()(const string &s)
{return s.size()>=b;}
};
int main()
{
string s("aaaaa");
for(int i=0;i!=10;++i)
cout<<count_if(s.begin(),s.end(),GT(i))<<endl;
return 0;
}