Skip to content

Latest commit

 

History

History
26 lines (21 loc) · 651 Bytes

compiler-error-c2082.md

File metadata and controls

26 lines (21 loc) · 651 Bytes
description title ms.date f1_keywords helpviewer_keywords ms.assetid
Learn more about: Compiler Error C2082
Compiler Error C2082
11/04/2016
C2082
C2082
87a6d442-157c-46e8-9bff-8388f8338ae0

Compiler Error C2082

redefinition of formal parameter 'identifier'

A formal parameter to a function is redeclared within the function body. To resolve the error, remove the redefinition.

The following sample generates C2082:

// C2082.cpp
void func(int num1) {
   int num1;   // C2082
   int num2;   // OK

   auto lambda1 = [](int num1){ int num1; };   // C2082
   auto lambda2 = [](int num1){ int num2; };   // OK
}