Compiler Error C2267
'function' : static functions with block scope are illegal
A local function is declared static
. Static functions must have global scope.
The following sample generates C2267:
// C2267.cpp
static int func2(); // OK
int main() {
static int func1(); // C2267
}
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for