description | title | ms.date | f1_keywords | helpviewer_keywords | ms.assetid | ||
---|---|---|---|---|---|---|---|
Learn more about: Compiler Error C2665 |
Compiler Error C2665 |
11/04/2016 |
|
|
a7f99b61-2eae-4f2b-ba75-ea68fd1e8312 |
'function' : none of the number1 overloads can convert parameter number2 from type 'type'
A parameter of the overloaded function cannot be converted to the required type. Possible resolutions:
-
Supply a conversion operator.
-
Use explicit conversion.
The following sample generates C2665.
// C2665.cpp
void func(short, char*){}
void func(char*, char*){}
int main() {
func(0, 1); // C2665
func((short)0, (char*)1); // OK
}