C/C++ Compiler (cl.hlp) (
Table of Contents;
Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software,
purely for historical purposes.
If you're looking for up-to-date documentation, particularly for programming,
you should not rely on the information found here, as it will be woefully
out of date.
C2231
◄Up► ◄Contents► ◄Index► ◄Back►
────────────────────────────────────────────────────────────────────────────
Compiler error C2231
'.' : left operand points to 'class-key', use '->'
The left operand to the member selection operator (.) was a
pointer to a class, structure, or union.
The left operand to 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
}
-♦-