'function1':重載函數僅與 'function2' 的傳回類型不同
備註
多載函式有不同的傳回型別,但相同的參數清單。 每個多載函式都必須有相異的型式參數清單。
範例
下列範例會產生 C2556:
// C2556.cpp
// compile with: /c
int func();
double func(); // C2556
int func(int i); // OK parameter lists differ
'function1':重載函數僅與 'function2' 的傳回類型不同
多載函式有不同的傳回型別,但相同的參數清單。 每個多載函式都必須有相異的型式參數清單。
下列範例會產生 C2556:
// C2556.cpp
// compile with: /c
int func();
double func(); // C2556
int func(int i); // OK parameter lists differ