Delen via


Compilerfout C2093

'variable1': kan niet worden geïnitialiseerd met behulp van het adres van de automatische variabele 'variable2'

Opmerkingen

Bij het compileren met /Za probeerde het programma het adres van een automatische variabele te gebruiken als initialisatiefunctie.

Example

In het volgende voorbeeld wordt C2093 gegenereerd:

// C2093.c
// compile with: /Za /c
void func() {
   int li;   // an implicit auto variable
   int * s[]= { &li };   // C2093 address is not a constant

   // OK
   static int li2;
   int * s2[]= { &li2 };
}