'.' : left operand points to 'class-key', use '–>'
The operand to the left of the member-selection operation (.) is a pointer instead of a class, structure, or union.
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 }