meaning of pointer expression

Suppose there is a class by name classA, and we initialize

1
2
3
4
classA *This = (classA*)this; // this is the this pointer
if(eval) {
    This->_score = (*eval)(*This);
}


here, eval is of some datatype Evaluate, and _score and eval are both members of class classA. I would like to know what the expression (*eval)(*This) means... Because I get segmentation error when I try to run this code... Its not my code, its from a library supposedly.

thank you.
what is 'this'? Like what class is this code from? Is it from classA? If not, then that's a bad cast.

Anyway 'eval' looks like it's a function pointer. (*eval)(*This); calls the function pointed to by eval with *this as the parameter.
Topic archived. No new replies allowed.