diff --git a/docs/error-messages/compiler-errors-1/compiler-error-c2351.md b/docs/error-messages/compiler-errors-1/compiler-error-c2351.md index cb65e6f46a..a3f4108c1c 100644 --- a/docs/error-messages/compiler-errors-1/compiler-error-c2351.md +++ b/docs/error-messages/compiler-errors-1/compiler-error-c2351.md @@ -1,18 +1,21 @@ --- -description: "Learn more about: Compiler Error C2351" title: "Compiler Error C2351" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Error C2351" +ms.date: 11/04/2016 f1_keywords: ["C2351"] helpviewer_keywords: ["C2351"] -ms.assetid: 5439ccf6-66f6-4859-964c-c73f5eddfc1b --- # Compiler Error C2351 -obsolete C++ constructor initialization syntax +> obsolete C++ constructor initialization syntax + +## Remarks In a new-style initialization list for a constructor, you must explicitly name each direct base class, even if it is the only base class. -The following sample generates C2351: +## Example + +The following example generates C2351: ```cpp // C2351.cpp diff --git a/docs/error-messages/compiler-errors-1/compiler-error-c2352.md b/docs/error-messages/compiler-errors-1/compiler-error-c2352.md index 54c319840e..8a5af21eae 100644 --- a/docs/error-messages/compiler-errors-1/compiler-error-c2352.md +++ b/docs/error-messages/compiler-errors-1/compiler-error-c2352.md @@ -1,18 +1,21 @@ --- -description: "Learn more about: Compiler Error C2352" title: "Compiler Error C2352" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Error C2352" +ms.date: 11/04/2016 f1_keywords: ["C2352"] helpviewer_keywords: ["C2352"] -ms.assetid: 0efad8cb-659f-4b3e-8f6f-9f8ec44d345c --- # Compiler Error C2352 -'class::function' : illegal call of non-static member function +> 'class::function' : illegal call of non-static member function + +## Remarks A **`static`** member function called a nonstatic member function. Or, a nonstatic member function was called from outside the class as a static function. -The following sample generates C2352 and shows how to fix it: +## Examples + +The following example generates C2352 and shows how to fix it: ```cpp // C2352.cpp @@ -28,7 +31,7 @@ public: }; ``` -The following sample generates C2352 and shows how to fix it: +The following example generates C2352 and shows how to fix it: ```cpp // C2352b.cpp diff --git a/docs/error-messages/compiler-errors-1/compiler-error-c2353.md b/docs/error-messages/compiler-errors-1/compiler-error-c2353.md index bbf3f1fdc6..50668f8cfe 100644 --- a/docs/error-messages/compiler-errors-1/compiler-error-c2353.md +++ b/docs/error-messages/compiler-errors-1/compiler-error-c2353.md @@ -1,18 +1,21 @@ --- -description: "Learn more about: Compiler Error C2353" title: "Compiler Error C2353" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Error C2353" +ms.date: 11/04/2016 f1_keywords: ["C2353"] helpviewer_keywords: ["C2353"] -ms.assetid: d57f8f77-d9b1-4bba-a940-87ec269ad183 --- # Compiler Error C2353 -exception specification is not allowed +> exception specification is not allowed + +## Remarks Exception specifications are not allowed on member functions of managed classes. -The following sample generates C2353: +## Example + +The following example generates C2353: ```cpp // C2353.cpp diff --git a/docs/error-messages/compiler-errors-1/compiler-error-c2355.md b/docs/error-messages/compiler-errors-1/compiler-error-c2355.md index 3c2ec1586f..abde37c99c 100644 --- a/docs/error-messages/compiler-errors-1/compiler-error-c2355.md +++ b/docs/error-messages/compiler-errors-1/compiler-error-c2355.md @@ -1,20 +1,23 @@ --- -description: "Learn more about: Compiler Error C2355" title: "Compiler Error C2355" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Error C2355" +ms.date: 11/04/2016 f1_keywords: ["C2355"] helpviewer_keywords: ["C2355"] -ms.assetid: 0a947881-d61f-4f98-8409-32140f39500b --- # Compiler Error C2355 -'this' : can only be referenced inside non-static member functions or non-static data member initializers +> 'this' : can only be referenced inside non-static member functions or non-static data member initializers + +## Remarks The **`this`** pointer is valid only within non-static member functions or in non-static data member initializers. This error can result when the class scope of a member function definition outside of the class declaration is not properly qualified. The error can also occur when the **`this`** pointer is used in a function that is not declared in the class. To fix this issue, make sure the member function definition matches a member function declaration in the class, and that it is not declared static. For data member initializers, make sure the data member is not declared static. -The following sample generates C2355 and shows how to fix it: +## Example + +The following example generates C2355 and shows how to fix it: ```cpp // C2355.cpp diff --git a/docs/error-messages/compiler-errors-1/compiler-error-c2356.md b/docs/error-messages/compiler-errors-1/compiler-error-c2356.md index 6049b17292..3ee44ce973 100644 --- a/docs/error-messages/compiler-errors-1/compiler-error-c2356.md +++ b/docs/error-messages/compiler-errors-1/compiler-error-c2356.md @@ -1,14 +1,15 @@ --- -description: "Learn more about: Compiler Error C2356" title: "Compiler Error C2356" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Error C2356" +ms.date: 11/04/2016 f1_keywords: ["C2356"] helpviewer_keywords: ["C2356"] -ms.assetid: 84d5a816-9a61-4d45-9978-38e485bbf767 --- # Compiler Error C2356 -initialization segment must not change during translation unit +> initialization segment must not change during translation unit + +## Remarks Possible causes: @@ -18,7 +19,9 @@ Possible causes: To resolve, move the segment initialization code to the beginning of the module. If multiple areas must be initialized, move them to separate modules. -The following sample generates C2356: +## Example + +The following example generates C2356: ```cpp // C2356.cpp diff --git a/docs/error-messages/compiler-errors-1/compiler-error-c2357.md b/docs/error-messages/compiler-errors-1/compiler-error-c2357.md index 0b06b9383d..67b2a2901c 100644 --- a/docs/error-messages/compiler-errors-1/compiler-error-c2357.md +++ b/docs/error-messages/compiler-errors-1/compiler-error-c2357.md @@ -1,14 +1,15 @@ --- -description: "Learn more about: Compiler Error C2357" title: "Compiler Error C2357" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Error C2357" +ms.date: 11/04/2016 f1_keywords: ["C2357"] helpviewer_keywords: ["C2357"] -ms.assetid: d1083945-0ea2-4385-9e66-8c665978806c --- # Compiler Error C2357 -'identifier' : must be a function of type 'type' +> 'identifier' : must be a function of type 'type' + +## Remarks Your code declares a version of the `atexit` function that does not match the version declared internally by the compiler. Declare `atexit` as follows: @@ -18,7 +19,9 @@ int __cdecl atexit(void (__cdecl *)()); For more information, see [init_seg](../../preprocessor/init-seg.md). -The following sample generates C2357: +## Example + +The following example generates C2357: ```cpp // C2357.cpp diff --git a/docs/error-messages/compiler-errors-1/compiler-error-c2360.md b/docs/error-messages/compiler-errors-1/compiler-error-c2360.md index 3fc5204e7b..58a393241a 100644 --- a/docs/error-messages/compiler-errors-1/compiler-error-c2360.md +++ b/docs/error-messages/compiler-errors-1/compiler-error-c2360.md @@ -1,18 +1,21 @@ --- -description: "Learn more about: Compiler Error C2360" title: "Compiler Error C2360" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Error C2360" +ms.date: 11/04/2016 f1_keywords: ["C2360"] helpviewer_keywords: ["C2360"] -ms.assetid: 51bfd2ee-8108-4777-aa93-148b9cebfa83 --- # Compiler Error C2360 -initialization of 'identifier' is skipped by 'case' label +> initialization of 'identifier' is skipped by 'case' label + +## Remarks The initialization of `identifier` can be skipped in a **`switch`** statement. You cannot jump past a declaration with an initializer unless the declaration is enclosed in a block. (Unless it is declared within a block, the variable is within scope until the end of the **`switch`** statement.) -The following sample generates C2360: +## Example + +The following example generates C2360: ```cpp // C2360.cpp diff --git a/docs/error-messages/compiler-errors-1/compiler-error-c2361.md b/docs/error-messages/compiler-errors-1/compiler-error-c2361.md index 6a7962c2d6..8c6743d7d4 100644 --- a/docs/error-messages/compiler-errors-1/compiler-error-c2361.md +++ b/docs/error-messages/compiler-errors-1/compiler-error-c2361.md @@ -1,18 +1,21 @@ --- -description: "Learn more about: Compiler Error C2361" title: "Compiler Error C2361" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Error C2361" +ms.date: 11/04/2016 f1_keywords: ["C2361"] helpviewer_keywords: ["C2361"] -ms.assetid: efbdaeb9-891c-4f7d-97da-89088a8413f3 --- # Compiler Error C2361 -initialization of 'identifier' is skipped by 'default' label +> initialization of 'identifier' is skipped by 'default' label + +## Remarks The initialization of `identifier` can be skipped in a **`switch`** statement. You cannot jump past a declaration with an initializer unless the declaration is enclosed in a block. (Unless it is declared within a block, the variable is within scope until the end of the **`switch`** statement.) -The following sample generates C2361: +## Example + +The following example generates C2361: ```cpp // C2361.cpp diff --git a/docs/error-messages/compiler-errors-1/compiler-error-c2362.md b/docs/error-messages/compiler-errors-1/compiler-error-c2362.md index ee78fcd6f0..5691441c21 100644 --- a/docs/error-messages/compiler-errors-1/compiler-error-c2362.md +++ b/docs/error-messages/compiler-errors-1/compiler-error-c2362.md @@ -1,20 +1,23 @@ --- -description: "Learn more about: Compiler Error C2362" title: "Compiler Error C2362" -ms.date: "06/03/2019" +description: "Learn more about: Compiler Error C2362" +ms.date: 06/03/2019 f1_keywords: ["C2362"] helpviewer_keywords: ["C2362"] -ms.assetid: 7aafecbc-b3cf-45a6-9ec3-a17e3f222511 --- # Compiler Error C2362 > initialization of '*identifier*' is skipped by 'goto *label*' +## Remarks + When compiled by using [/Za](../../build/reference/za-ze-disable-language-extensions.md), a jump to the label prevents the identifier from being initialized. You can only jump past a declaration with an initializer if the declaration is enclosed in a block that isn't entered, or if the variable has already been initialized. -The following sample generates C2362: +## Example + +The following example generates C2362: ```cpp // C2362.cpp diff --git a/docs/error-messages/compiler-errors-1/compiler-error-c2364.md b/docs/error-messages/compiler-errors-1/compiler-error-c2364.md index 38050c2e71..8eeabc0bef 100644 --- a/docs/error-messages/compiler-errors-1/compiler-error-c2364.md +++ b/docs/error-messages/compiler-errors-1/compiler-error-c2364.md @@ -1,20 +1,21 @@ --- -description: "Learn more about: Compiler Error C2364" title: "Compiler Error C2364" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Error C2364" +ms.date: 11/04/2016 f1_keywords: ["C2364"] helpviewer_keywords: ["C2364"] -ms.assetid: 4f550571-94b5-42ca-84cb-663fecbead44 --- # Compiler Error C2364 -'type': illegal type for custom attribute +> 'type': illegal type for custom attribute + +## Remarks Named arguments for custom attributes are limited to compile time constants. For example, integral types (int, char, etc.), System::Type^, and System::Object^. ## Example -The following sample generates C2364. +The following example generates C2364. ```cpp // c2364.cpp diff --git a/docs/error-messages/compiler-errors-1/compiler-error-c2365.md b/docs/error-messages/compiler-errors-1/compiler-error-c2365.md index 11c859cbdd..7fd276bfe7 100644 --- a/docs/error-messages/compiler-errors-1/compiler-error-c2365.md +++ b/docs/error-messages/compiler-errors-1/compiler-error-c2365.md @@ -1,18 +1,21 @@ --- -description: "Learn more about: Compiler Error C2365" title: "Compiler Error C2365" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Error C2365" +ms.date: 11/04/2016 f1_keywords: ["C2365"] helpviewer_keywords: ["C2365"] -ms.assetid: 35839b0b-4055-4b79-8957-b3a0871bdd02 --- # Compiler Error C2365 -'class member' : redefinition; previous definition was 'class member' +> 'class member' : redefinition; previous definition was 'class member' + +## Remarks You attempted to redefine a class member. -The following sample generates C2365. +## Example + +The following example generates C2365. ```cpp // C2365.cpp diff --git a/docs/error-messages/compiler-errors-1/compiler-error-c2368.md b/docs/error-messages/compiler-errors-1/compiler-error-c2368.md index a2f6d269f0..7711b7ae2c 100644 --- a/docs/error-messages/compiler-errors-1/compiler-error-c2368.md +++ b/docs/error-messages/compiler-errors-1/compiler-error-c2368.md @@ -1,13 +1,14 @@ --- -description: "Learn more about: Compiler Error C2368" title: "Compiler Error C2368" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Error C2368" +ms.date: 11/04/2016 f1_keywords: ["C2368"] helpviewer_keywords: ["C2368"] -ms.assetid: a824626f-9fb5-453b-a3a4-da89d1e32218 --- # Compiler Error C2368 -'identifier' : redefinition; different allocation specifiers +> 'identifier' : redefinition; different allocation specifiers + +## Remarks The declaration and definition of the symbol specify different **`__declspec`** attributes. diff --git a/docs/error-messages/compiler-errors-1/compiler-error-c2369.md b/docs/error-messages/compiler-errors-1/compiler-error-c2369.md index aab5f981a6..27a97bd486 100644 --- a/docs/error-messages/compiler-errors-1/compiler-error-c2369.md +++ b/docs/error-messages/compiler-errors-1/compiler-error-c2369.md @@ -1,18 +1,21 @@ --- -description: "Learn more about: Compiler Error C2369" title: "Compiler Error C2369" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Error C2369" +ms.date: 11/04/2016 f1_keywords: ["C2369"] helpviewer_keywords: ["C2369"] -ms.assetid: 2a3933f6-2313-40ff-800f-921b296fdbbf --- # Compiler Error C2369 -'array' : redefinition; different subscripts +> 'array' : redefinition; different subscripts + +## Remarks The array is already declared with a different subscript. -The following sample generates C2369: +## Example + +The following example generates C2369: ```cpp // C2369.cpp diff --git a/docs/error-messages/compiler-errors-1/compiler-error-c2370.md b/docs/error-messages/compiler-errors-1/compiler-error-c2370.md index 644e2724e5..256c331a63 100644 --- a/docs/error-messages/compiler-errors-1/compiler-error-c2370.md +++ b/docs/error-messages/compiler-errors-1/compiler-error-c2370.md @@ -1,20 +1,21 @@ --- -description: "Learn more about: Compiler Error C2370" title: "Compiler Error C2370" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Error C2370" +ms.date: 11/04/2016 f1_keywords: ["C2370"] helpviewer_keywords: ["C2370"] -ms.assetid: 03403e8f-f393-47c4-bd25-5c1c7ea7d5cd --- # Compiler Error C2370 -'identifier' : redefinition; different storage class +> 'identifier' : redefinition; different storage class + +## Remarks The identifier is already declared with a different storage class. ## Examples -The following sample generates C2370: +The following example generates C2370: ```cpp // C2370.cpp @@ -24,7 +25,7 @@ static int i; // C2370 int i; // OK ``` -The following sample generates C2370: +The following example generates C2370: ```cpp // C2370b.cpp diff --git a/docs/error-messages/compiler-errors-1/compiler-error-c2371.md b/docs/error-messages/compiler-errors-1/compiler-error-c2371.md index 3574efe530..bb5ba669bf 100644 --- a/docs/error-messages/compiler-errors-1/compiler-error-c2371.md +++ b/docs/error-messages/compiler-errors-1/compiler-error-c2371.md @@ -1,18 +1,21 @@ --- -description: "Learn more about: Compiler Error C2371" title: "Compiler Error C2371" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Error C2371" +ms.date: 11/04/2016 f1_keywords: ["C2371"] helpviewer_keywords: ["C2371"] -ms.assetid: d383993d-05ef-4e35-8129-3b58a6f7b7b7 --- # Compiler Error C2371 -'identifier' : redefinition; different basic types +> 'identifier' : redefinition; different basic types + +## Remarks The identifier is already declared. -The following sample generates C2371: +## Example + +The following example generates C2371: ```cpp // C2371.cpp diff --git a/docs/error-messages/compiler-errors-1/compiler-error-c2372.md b/docs/error-messages/compiler-errors-1/compiler-error-c2372.md index eac3e935a7..e893c5eb51 100644 --- a/docs/error-messages/compiler-errors-1/compiler-error-c2372.md +++ b/docs/error-messages/compiler-errors-1/compiler-error-c2372.md @@ -1,18 +1,21 @@ --- -description: "Learn more about: Compiler Error C2372" title: "Compiler Error C2372" -ms.date: "03/23/2020" +description: "Learn more about: Compiler Error C2372" +ms.date: 03/23/2020 f1_keywords: ["C2372"] helpviewer_keywords: ["C2372"] -ms.assetid: 406bea63-c8d3-4231-9d26-c70af6980840 --- # Compiler Error C2372 > '*identifier*' : redefinition; different types of indirection +## Remarks + The identifier is already defined with a different derived type. -The following sample generates C2372: +## Example + +The following example generates C2372: ```cpp // C2372.cpp diff --git a/docs/error-messages/compiler-errors-1/compiler-error-c2373.md b/docs/error-messages/compiler-errors-1/compiler-error-c2373.md index 2122dfb298..1a2078adf1 100644 --- a/docs/error-messages/compiler-errors-1/compiler-error-c2373.md +++ b/docs/error-messages/compiler-errors-1/compiler-error-c2373.md @@ -1,18 +1,21 @@ --- -description: "Learn more about: Compiler Error C2373" title: "Compiler Error C2373" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Error C2373" +ms.date: 11/04/2016 f1_keywords: ["C2373"] helpviewer_keywords: ["C2373"] -ms.assetid: 7a08bf0b-852d-48be-ba75-70df9f4b5951 --- # Compiler Error C2373 -'identifier' : redefinition; different type modifiers +> 'identifier' : redefinition; different type modifiers + +## Remarks The identifier is already defined with a different type modifier. -The following sample generates C2373: +## Example + +The following example generates C2373: ``` // C2373.h diff --git a/docs/error-messages/compiler-errors-1/compiler-error-c2374.md b/docs/error-messages/compiler-errors-1/compiler-error-c2374.md index 6d1b49420d..ae1d39df38 100644 --- a/docs/error-messages/compiler-errors-1/compiler-error-c2374.md +++ b/docs/error-messages/compiler-errors-1/compiler-error-c2374.md @@ -1,18 +1,21 @@ --- -description: "Learn more about: Compiler Error C2374" title: "Compiler Error C2374" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Error C2374" +ms.date: 11/04/2016 f1_keywords: ["C2374"] helpviewer_keywords: ["C2374"] -ms.assetid: 73b51965-e91c-4e21-9732-f71c1449d22e --- # Compiler Error C2374 -'identifier' : redefinition; multiple initialization +> 'identifier' : redefinition; multiple initialization + +## Remarks The identifier is initialized more than once. -The following sample generates C2374: +## Example + +The following example generates C2374: ```cpp // C2374.cpp diff --git a/docs/error-messages/compiler-errors-1/compiler-error-c2375.md b/docs/error-messages/compiler-errors-1/compiler-error-c2375.md index 2a7da09bf7..a70339533a 100644 --- a/docs/error-messages/compiler-errors-1/compiler-error-c2375.md +++ b/docs/error-messages/compiler-errors-1/compiler-error-c2375.md @@ -1,18 +1,21 @@ --- -description: "Learn more about: Compiler Error C2375" title: "Compiler Error C2375" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Error C2375" +ms.date: 11/04/2016 f1_keywords: ["C2375"] helpviewer_keywords: ["C2375"] -ms.assetid: 193c5e8b-1b20-4928-8a02-8c1cddaf2a26 --- # Compiler Error C2375 -'function' : redefinition; different linkage +> 'function' : redefinition; different linkage + +## Remarks The function is already declared with a different linkage specifier. -The following sample generates C2375: +## Example + +The following example generates C2375: ```cpp // C2375.cpp diff --git a/docs/error-messages/compiler-errors-1/compiler-error-c2376.md b/docs/error-messages/compiler-errors-1/compiler-error-c2376.md index 6e089703c8..0cb73a4d37 100644 --- a/docs/error-messages/compiler-errors-1/compiler-error-c2376.md +++ b/docs/error-messages/compiler-errors-1/compiler-error-c2376.md @@ -1,13 +1,14 @@ --- -description: "Learn more about: Compiler Error C2376" title: "Compiler Error C2376" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Error C2376" +ms.date: 11/04/2016 f1_keywords: ["C2376"] helpviewer_keywords: ["C2376"] -ms.assetid: 89423cf7-a24a-4bb3-a2ed-36a1ff8ba458 --- # Compiler Error C2376 -'function' : redefinition; different based allocation +> 'function' : redefinition; different based allocation + +## Remarks The function is already declared with a different based allocation. diff --git a/docs/error-messages/compiler-errors-1/compiler-error-c2377.md b/docs/error-messages/compiler-errors-1/compiler-error-c2377.md index 409d365c34..5ed9e0b264 100644 --- a/docs/error-messages/compiler-errors-1/compiler-error-c2377.md +++ b/docs/error-messages/compiler-errors-1/compiler-error-c2377.md @@ -1,18 +1,21 @@ --- -description: "Learn more about: Compiler Error C2377" title: "Compiler Error C2377" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Error C2377" +ms.date: 11/04/2016 f1_keywords: ["C2377"] helpviewer_keywords: ["C2377"] -ms.assetid: f7660965-bf4c-4cd9-8307-1bd7016678a1 --- # Compiler Error C2377 -'identifier' : redefinition; typedef cannot be overloaded with any other symbol +> 'identifier' : redefinition; typedef cannot be overloaded with any other symbol + +## Remarks A **`typedef`** identifier is redefined. -The following sample generates C2377: +## Example + +The following example generates C2377: ```cpp // C2377.cpp diff --git a/docs/error-messages/compiler-errors-1/compiler-error-c2378.md b/docs/error-messages/compiler-errors-1/compiler-error-c2378.md index a42b65d5c7..5005fb5f36 100644 --- a/docs/error-messages/compiler-errors-1/compiler-error-c2378.md +++ b/docs/error-messages/compiler-errors-1/compiler-error-c2378.md @@ -1,18 +1,21 @@ --- -description: "Learn more about: Compiler Error C2378" title: "Compiler Error C2378" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Error C2378" +ms.date: 11/04/2016 f1_keywords: ["C2378"] helpviewer_keywords: ["C2378"] -ms.assetid: 507a91c6-ca72-48df-b3a4-2cf931c86806 --- # Compiler Error C2378 -'identifier' : redefinition; symbol cannot be overloaded with a typedef +> 'identifier' : redefinition; symbol cannot be overloaded with a typedef + +## Remarks The identifier was redefined as a **`typedef`**. -The following sample generates C2378: +## Example + +The following example generates C2378: ```cpp // C2378.cpp diff --git a/docs/error-messages/compiler-errors-1/compiler-error-c2379.md b/docs/error-messages/compiler-errors-1/compiler-error-c2379.md index f10e6b2a95..46c248af53 100644 --- a/docs/error-messages/compiler-errors-1/compiler-error-c2379.md +++ b/docs/error-messages/compiler-errors-1/compiler-error-c2379.md @@ -1,18 +1,21 @@ --- -description: "Learn more about: Compiler Error C2379" title: "Compiler Error C2379" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Error C2379" +ms.date: 11/04/2016 f1_keywords: ["C2379"] helpviewer_keywords: ["C2379"] -ms.assetid: 37dc3015-a4af-4341-bbf3-da6150df7e51 --- # Compiler Error C2379 -formal parameter number has different type when promoted +> formal parameter number has different type when promoted + +## Remarks The type of the specified parameter is not compatible, through default promotions, with the type in a previous declaration. This is an error in ANSI C ([/Za](../../build/reference/za-ze-disable-language-extensions.md)) and a warning with Microsoft extensions (**/Ze**). -The following sample generates C2379: +## Example + +The following example generates C2379: ```c // C2379.c diff --git a/docs/error-messages/compiler-errors-1/compiler-error-c2380.md b/docs/error-messages/compiler-errors-1/compiler-error-c2380.md index 4e2bdc5026..9b317bd13d 100644 --- a/docs/error-messages/compiler-errors-1/compiler-error-c2380.md +++ b/docs/error-messages/compiler-errors-1/compiler-error-c2380.md @@ -1,18 +1,21 @@ --- -description: "Learn more about: Compiler Error C2380" title: "Compiler Error C2380" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Error C2380" +ms.date: 11/04/2016 f1_keywords: ["C2380"] helpviewer_keywords: ["C2380"] -ms.assetid: 717b1e6e-ddfe-4bac-a5f3-7f9a4dcb1572 --- # Compiler Error C2380 -type(s) preceding 'identifier' (constructor with return type, or illegal redefinition of current class-name?) +> type(s) preceding 'identifier' (constructor with return type, or illegal redefinition of current class-name?) + +## Remarks A constructor returns a value or redefines the class name. -The following sample generates C2326: +## Example + +The following example generates C2326: ```cpp // C2380.cpp