Skip to content

Commit 59f4e8a

Browse files
committed
Missing error articles C2000-C2099
1 parent 56d6c4c commit 59f4e8a

15 files changed

+327
-102
lines changed
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
description: "Learn more about: Compiler Error C2016"
3+
title: "Compiler Error C2016"
4+
ms.date: 08/18/2022
5+
f1_keywords: ["C2016"]
6+
helpviewer_keywords: ["C2016"]
7+
---
8+
# Compiler Error C2016
9+
10+
> C requires that a struct or union has at least one member
11+
12+
The compiler found a **`struct`** or **`union`** defined with no members, which isn't allowed in C. For more information, see [Structures](../../c-language/structure-declarations.md) and [Unions](../../c-language/union-declarations.md).
13+
14+
To resolve this error, create at least one member in your **`struct`** or **`union`**.
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
description: "Learn more about: Compiler Error C2023"
3+
title: "Compiler Error C2023"
4+
ms.date: 08/18/2022
5+
f1_keywords: ["C2023"]
6+
helpviewer_keywords: ["C2023"]
7+
---
8+
# Compiler Error C2023
9+
10+
> '*identifier*': Alignment (*value-1*) different from prior declaration (*value-2*)
11+
12+
The compiler found an alignment specifier for a class type that's different from a previous declaration, or an **`enum`** alignment specifier that's different from the natural alignment of the base type.
13+
14+
To resolve this error, make sure all declarations and definitions of the type use the same alignment value.
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
description: "Learn more about: Compiler Error C2024"
3+
title: "Compiler Error C2024"
4+
ms.date: 08/18/2022
5+
f1_keywords: ["C2024"]
6+
helpviewer_keywords: ["C2024"]
7+
---
8+
# Compiler Error C2024
9+
10+
> 'alignas' attribute applies to variables, data members and tag types only
11+
12+
The compiler found an **`alignas`** specifier applied to a function or other type that can't be aligned.
13+
14+
To resolve this error, remove the **`alignas`** specifier.
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
description: "Learn more about: Compiler Error C2025"
3+
title: "Compiler Error C2025"
4+
ms.date: 08/18/2022
5+
f1_keywords: ["C2025"]
6+
helpviewer_keywords: ["C2025"]
7+
---
8+
# Compiler Error C2025
9+
10+
> invalid or corrupted binary module interface file: '*filename*'
11+
12+
The compiler could not read the specified IFC file.
13+
14+
To resolve this error, rebuild the module interface file.
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
description: "Learn more about: Compiler Error C2031"
3+
title: "Compiler Error C2031"
4+
ms.date: 08/18/2022
5+
f1_keywords: ["C2031"]
6+
helpviewer_keywords: ["C2031"]
7+
---
8+
# Compiler Error C2031
9+
10+
> a virtual destructor with '*accessibility*' accessibility is not allowed for this type\
11+
> a virtual destructor must have 'public' accessibility
12+
13+
A virtual Windows Runtime class has an access specifier or **`sealed`** specifier that's not allowed for a virtual destructor. For more information, see [Ref classes and structs](../../cppcx/ref-classes-and-structs-c-cx.md).
14+
15+
To fix this error, change the accessibility of the destructor.
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
description: "Learn more about: Compiler Error C2035"
3+
title: "Compiler Error C2035"
4+
ms.date: 08/18/2022
5+
f1_keywords: ["C2035"]
6+
helpviewer_keywords: ["C2035"]
7+
---
8+
# Compiler Error C2035
9+
10+
> a non-virtual destructor with '*accessibility*' accessibility is not allowed for this type\
11+
> a non-virtual destructor must have 'protected private' or 'private' accessibility
12+
13+
A non-virtual Windows Runtime class has an access specifier or **`sealed`** specifier that's not allowed for a non-virtual destructor. For more information, see [Ref classes and structs](../../cppcx/ref-classes-and-structs-c-cx.md).
14+
15+
To fix this error, change the accessibility of the destructor.
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
description: "Learn more about: Compiler Error C2037"
3+
title: "Compiler Error C2037"
4+
ms.date: 08/18/2022
5+
f1_keywords: ["C2037"]
6+
helpviewer_keywords: ["C2037"]
7+
---
8+
# Compiler Error C2037
9+
10+
> left of '*operator*' specifies undefined struct/union '*type*'
11+
12+
The operand to the left of the member-selection *operator* is not a fully defined class, structure, or union.
13+
14+
This error can be caused by a left operand that is an undefined variable.
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
description: "Learn more about: Compiler Error C2038"
3+
title: "Compiler Error C2038"
4+
ms.date: 08/18/2022
5+
f1_keywords: ["C2038"]
6+
helpviewer_keywords: ["C2038"]
7+
---
8+
# Compiler Error C2038
9+
10+
> the std namespace cannot be inline
11+
12+
The C++ standard does not allow the `std` namespace to be declared `inline`.
13+
14+
To resolve this issue, remove the `inline` specifier.
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
description: "Learn more about: Compiler Error C2049"
3+
title: "Compiler Error C2049"
4+
ms.date: 08/18/2022
5+
f1_keywords: ["C2049"]
6+
helpviewer_keywords: ["C2049"]
7+
---
8+
# Compiler Error C2049
9+
10+
> '*namespace-name*': non-inline namespace cannot be reopened as inline
11+
12+
The **`inline`** keyword may be used on a namespace definition extension only if it was also used on the original namespace definition.
13+
14+
To resolve this issue, make the use of the **`inline`** specifier consistent across all parts of the namespace.
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
---
2+
description: "Learn more about: Compiler Error C2068"
3+
title: "Compiler Error C2068"
4+
ms.date: 08/18/2022
5+
f1_keywords: ["C2068"]
6+
helpviewer_keywords: ["C2068"]
7+
---
8+
# Compiler Error C2068
9+
10+
> illegal use of overloaded function. Missing argument list?
11+
12+
The compiler detected the invalid use of an overloaded function with no arguments.
13+
14+
For example:
15+
16+
```cpp
17+
void f(int x) {}
18+
void f(char x) {}
19+
void g() noexcept( noexcept(f) );
20+
```
21+
22+
To resolve this issue, include the argument types required to resolve the function overload.

0 commit comments

Comments
 (0)