Skip to content

Latest commit

 

History

History
25 lines (21 loc) · 583 Bytes

compiler-error-c2807.md

File metadata and controls

25 lines (21 loc) · 583 Bytes
description title ms.date f1_keywords helpviewer_keywords ms.assetid
Learn more about: Compiler Error C2807
Compiler Error C2807
11/04/2016
C2807
C2807
bd7a207a-f379-4de6-8ee8-c7cab78b3480

Compiler Error C2807

the second formal parameter to postfix 'operator operator' must be 'int'

The second parameter to a postfix operator has the wrong type.

The following sample generates C2807:

// C2807.cpp
// compile with: /c
class X {
public:
   X operator++ ( X );   // C2807 nonvoid parameter
   X operator++ ( int );   // OK, int parameter
};