C1012: Illegal local function definition

[ERROR]

Description

Non-standard error!

Example
void main() {
  struct A {
    void f() {}
  };
}
Tips

The function definitions must always be in the global scope.

void main(void) {
  struct A {
    void f();
  };
}
void A::f(void) {
  // function definition in global scope
}