Comment on Q: Why can I access an out-of-scope C++ var? A: So you rent a hotel room...parentComments−nuxi15yIt's not that predictable - try changing bar() to static int *bar(int dummy) and call it with bar(10);
Comments
It's not that predictable - try changing bar() to
and call it with