הערה
הגישה לדף זה מחייבת הרשאה. באפשרותך לנסות להיכנס או לשנות מדריכי כתובות.
הגישה לדף זה מחייבת הרשאה. באפשרותך לנסות לשנות מדריכי כתובות.
'operator' : 'identifier1' differs in levels of indirection from 'identifier2'
Remarks
An expression involving the specified operands has incompatible operand types or implicitly converted operand types. If both operands are arithmetic, or both are nonarithmetic (such as array or pointer), they are used without change. If one operand is arithmetic and the other is not, the arithmetic operand is converted to the type of the nonarithmetic operand.
Example
This example generates C2040 and shows how to fix it.
// C2040.cpp
// Compile by using: cl /c /W3 C2040.cpp
bool test() {
char c = '3';
return c == "3"; // C2446, C2040
// return c == '3'; // OK
}