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.
C2232
◄Up► ◄Contents► ◄Index► ◄Back►
────────────────────────────────────────────────────────────────────────────
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
}
-♦-