Export (0) Print
Expand All
Expand Minimize
1 out of 2 rated this helpful - Rate this topic

Compiler Error C2267

Error Message

'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
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

© 2014 Microsoft. All rights reserved.