std count_if用法

#include 
#include 

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  
{  
	bool operator()( USERINFO* &value, unsigned long uid) const  
	{  
		if (value->ulDepartID== uid)  
			return true;  
		else  
			return false;  
	}  
};


你可能感兴趣的:(std count_if用法)