why wasn't the idea of nested functions, implemented in older c++ standard?
问题 was the idea of nested functions considered to be useless during the time of developing older c++ standard, because its usage is basically covered by another concept like object-oriented programming; or it wasn't implemented just as a matter of simplification? 回答1: Nested functions - to be useful - need the stack frame of the containing function as context. Look at this: class Foo() { void Tripulate() { int i=0; void Dip() { // ... } int x = 12; for(i=1; i<=3; ++i) { int z= 33; Dip(); // ...