Condividi tramite


Errore del compilatore C2806

'operator operator' ha troppi parametri formali

Un operatore di overload ha troppi parametri.

L'esempio seguente genera l'errore C2806:

// C2806.cpp
// compile with: /c
class X {
public:
   X operator++ ( int, int );   // C2806 more than 1 parameter
   X operator++ ( int );   // OK
} ;