How do I call a pointer to a member function?

doing it like this gives the error 'term does not evaluate to a function taking 1 argument'


where function is of the type

void (__thiscall CBaseEntity::* inputfunc_t)(inputdata_t *data)

and ent is of type CBaseEntity*

If ent is a single pointer to a CBaseEntity then you can do


If ent is an array of CBaseEntity objects then you can do


If you are acessing a members of the CBaseEntity object and calling a function that exist for that member than it would be

// or
ent[i]->menber.function(); // if member is not a pointer

lastly if you are calling a function that returns a object and calling a function of that returned object