Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
function 'function' already has a body
Remarks
The function has already been defined.
Before Visual Studio 2002,
- The compiler would accept multiple template specializations that resolved to the same actual type, although the additional definitions would never be available. The compiler now detects these multiple definitions. 
- __int32and- intwere treated as separate types. The compiler now treats- __int32as a synonym for- int. This means that the compiler detects multiple definitions if a function is overloaded on both- __int32and- intand gives an error.
Example
The following example 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) {}