Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
'type' : illegal as right side of '->' operator
Remarks
A type appears as the right operand of a -> operator.
This error can be caused by trying to access a user-defined type conversion. Use the keyword operator between -> and type.
Example
The following example generates C2273:
// C2273.cpp
struct MyClass {
operator int() {
return 0;
}
};
int main() {
MyClass * ClassPtr = new MyClass;
int i = ClassPtr->int(); // C2273
int j = ClassPtr-> operator int(); // OK
}