Compiler Error C2084 (original) (raw)

function 'function' already has a body

The function has already been defined.

Before Visual Studio 2002,

Example

The following sample generates C2084:

// C2084.cpp
void Func(int);
void Func(int) {}   // define function
void Func(int) {}   // C2084 second definition

To correct this error, remove the duplicate definition:

// C2084b.cpp
// compile with: /c
void Func(int);
void Func(int) {}