Compiler Warning (level 2) C4284

return type for 'identifier::operator –>' is not a UDT or reference to a UDT. Will produce errors if applied using infix notation

The operator–>( ) function must return either a pointer to a class or an object of or a reference to a class for which operator–>( ) is defined.

The following example causes this warning:

class C
{
public:
    int operator->();  // warning
};

It is meaningless to apply the member access operator to fundamental data types that have no member acess. This warning message will appear when this happens.


Send feedback to MSDN.Look here for MSDN Online resources.