HP Code Advisor Diagnostics

case 20: printf("twenty\n"); break;
default: printf("error\n");
}
}
}
Action:
Check if it is a programming error.
Reference:
2245 a nonstatic member reference must be relative to a specific object
Cause:
Only static members can be accessed using the class name. For accessing non-static members,
specific object must be used.
Example:
struct Dummy {
int i;
};
Dummy::i = 10;
}
Action:
Access non-static members through objects only. For example: Dummy d; d.i = 10;
Reference:
2248 pointer to reference is not allowed
Cause:
Pointer to reference is incorrect and is not allowed.
Example:
int *i = 0;
int & * pri = i;
}
Action:
Check if you meant to declare a pointer to a reference. For example: int * & pri = i;
Reference:
ANSI/ISO C++ 8.3.2 (4)
2249 reference to reference is not allowed
Cause:
Reference to reference is incorrect and is not allowed.
Example:
int i = 0;
int & & ri = i;
}
Action:
Check if you typed extra & by mistake. For example: int & ri = i;
Reference:
ANSI/ISO C++ 8.3.2 (4)
2245 a nonstatic member reference must be relative to a specific object 39