Kompilatorfel C2267

"funktion" : statiska funktioner med blockomfång är olagliga

Anmärkningar

En lokal funktion deklareras static. Statiska funktioner måste ha globalt omfång.

Example

I följande exempel genereras C2267:

// C2267.cpp
static int func2();   // OK
int main() {
    static int func1();   // C2267
}