Compiler Error C2267
Visual Studio 2015
The new home for Visual Studio documentation is Visual Studio 2017 Documentation on docs.microsoft.com.
The latest version of this topic can be found at 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
}
Show: