次のコードで実験でくる。今日実験したら答えはcall_foo_a()もcall_foo_b()も30やったわ;
■ "a.cpp"
static foo {
 int func(int x, int y) { return x + y; }
};
void call_foo_a() {
 foo x;
 printf("%s: func(10, 20)=%d\n", __FUNCTION__, x.func(10, 20));
}

■ "b.cpp"
(a.cppと同じだが、foo::func()の中身を return x - y;に変えたやつ)

■ "main.cpp"
extern void call_foo_a();
extern void call_foo_b();
int main() {
call_foo_a(); call_foo_b();
}