次の方法で共有


コンパイラ エラー C2264

'function': 関数宣言か定義にエラーがあるので、関数が呼び出せません

注釈

定義または宣言が正しくないため、関数を呼び出すことはできません。

Example

次の例では C2264 が生成されます。

// C2264.cpp
struct C {
   // Delete the following line to resolve.
   operator int(int = 0){}   // incorrect declaration
};

struct D {
   operator int(){return 0;}   // OK
};

int main() {
   int i;

   C c;
   i = c;   // C2264

   D d;
   i = d;   // OK
}