Sdílet prostřednictvím


Chyba kompilátoru C2264

'function' : chyba v definici nebo deklaraci funkce; funkce není volána

Funkci nelze volat z důvodu nesprávné definice nebo deklarace.

Následující ukázka vygeneruje 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
}