Compiler Error C2231

'.' : left operand points to 'class-key', use '–>'

The left operand of the member selection operator (.) was a pointer to a class, structure, or union.

The left operand of the member selection operator must be a class, structure, or union.

The following is an example of this example:

struct S
{
public:
    int member;
} s, *ps;
void main()
{
   ps.member = 0;  // error, ps points to structure S
   ps->member = 0; // OK, ps points to a structure S
   s.member = 0;   // OK, s is a structure type
}