c++ - The use of declaring function inside a function? -


possible duplicate:
is there use function declarations inside functions?

i know inside function can declare function. use of it? can please bring simple example?

there little value declaring function inside function, unless intend on defining later , having available function- i.e., function declaration encapsulated.

int main() {     void foo();     foo(); } void some_other_func() {     foo(); // error } void foo() { } 

but that's it. in comparison triggering vexing parse, extremely limited benefit @ best.


Comments

Popular posts from this blog

objective c - Change font of selected text in UITextView -

php - Accessing POST data in Facebook cavas app -

c# - Getting control value when switching a view as part of a multiview -