Skip to content

Commit 3d89a34

Browse files
authored
Merge pull request #5189 from Rageking8/add-example-and-augment-c2200-page
Add example and augment C2200 page
2 parents c70db49 + e9ab516 commit 3d89a34

File tree

1 file changed

+13
-5
lines changed

1 file changed

+13
-5
lines changed
Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,21 @@
11
---
2-
description: "Learn more about: Compiler Error C2200"
32
title: "Compiler Error C2200"
4-
ms.date: "11/04/2016"
3+
description: "Learn more about: Compiler Error C2200"
4+
ms.date: "02/15/2025"
55
f1_keywords: ["C2200"]
66
helpviewer_keywords: ["C2200"]
7-
ms.assetid: a04139a6-ce18-404b-9bfd-2369fc0af3cb
87
---
98
# Compiler Error C2200
109

11-
'function' : function has already been defined
10+
'function': function has already been defined
11+
12+
An [`alloc_text`](../../preprocessor/alloc-text.md) pragma uses a function name already defined. Ensure the `alloc_text` pragma appears after the function declaration but before its definition.
13+
14+
The following sample generates C2200:
1215

13-
An `alloc_text` pragma uses a function name already defined.
16+
```cpp
17+
// C2200.cpp
18+
// compile with: /c
19+
extern "C" void func() {}
20+
#pragma alloc_text("section", func) // C2200
21+
```

0 commit comments

Comments
 (0)