description | title | ms.date | f1_keywords | helpviewer_keywords | ||
---|---|---|---|---|---|---|
Learn more about: Compiler Error C2103 |
Compiler Error C2103 |
03/04/2024 |
|
|
'&' on register variable
You cannot take the address of a register.
The following sample generates C2103:
// C2103.c
int main(void)
{
register int x = 1;
int* ptr = &x; // C2103
}
Note
This error applies to C code.