stl list of pointers

Can any one please tell me why i get this error. Is this not possible?

1
2
3
4
Bool operator==(const Master::ClientInfo* clientInfo, const U32& clientId) 

“error: ‘Bool operator==(const JCI::HbMaster::ClientInfo*, const U32&)’ must have an argument of class or enumerated type”


Summary : I have an stl list of ClientInfo*. Now I wanted to avoid the search "for loop" to search the ClientInfo* in list. Thus i though to use ClientList.remove(clientId) and use and comparison operator.

But I get such errors. Please let me know since the list is of pointer is above possible ?

Note : clientId is unique ID in stuct ClientInfo to find exact client

http://stackoverflow.com/questions/7493932/what-causes-c-compiler-error-must-have-argument-of-class-or-enumerated-type

Is there a reason why you cannot use a reference instead of a pointer? As in:

Bool operator==(const Master::ClientInfo& clientInfo, const U32& clientId)
Topic archived. No new replies allowed.