Compiler Error C2232

'–>' : left operand has 'class-key' type, use '.'

The class member access operator (->) was used on a nonpointer.

The pointer form of the class member access operator can only be used with a pointer to a class, structure, or union. The dot (.) form of the operator should be used with a class, structure, or union type.

The following is an example of this error:

struct X
{
    int member;
} x, *px;
void main()
{
    x->member = 0;   // error, x is not a pointer
    px->member = 0;  // OK, px is a pointer to an X
    x.member = 0;    // OK
}