#include <functional>
#include <algorithm>
nTotalCount= count_if(containerls.vPointers.begin(),containerls.vPointers.end(),bind2nd(compareuserinfoT(),deptmitm.ulDepartID));
nOnlineCount= count_if(containerls.vPointers.begin(),containerls.vPointers.end(),bind2nd(compareuserinfoO(),deptmitm.ulDepartID));
namespace std::
struct compareuserinfoT: binary_function<USERINFO*, unsigned long,bool>
{
bool operator()( USERINFO* &value, unsigned long uid) const
{
if (value->ulDepartID== uid)
return true;
else
return false;
}
};