We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 2055c4d + 700a52c commit c928384Copy full SHA for c928384
docs/error-messages/compiler-errors-1/compiler-error-c2103.md
@@ -1,13 +1,26 @@
1
---
2
description: "Learn more about: Compiler Error C2103"
3
title: "Compiler Error C2103"
4
-ms.date: "11/04/2016"
+ms.date: "03/04/2024"
5
f1_keywords: ["C2103"]
6
helpviewer_keywords: ["C2103"]
7
-ms.assetid: dfe95972-35e9-469a-b8a8-52c849d4e4e4
8
9
# Compiler Error C2103
10
11
'&' on register variable
12
13
You cannot take the address of a register.
+
14
+The following sample generates C2103:
15
16
+```c
17
+// C2103.c
18
+int main(void)
19
+{
20
+ register int x = 1;
21
+ int* ptr = &x; // C2103
22
+}
23
+```
24
25
+> [!NOTE]
26
+> This error applies to C code.
0 commit comments