Could someone please tell me if this is possible in C or C++?
void fun_a(); //int fun_b(); ... main(){ ... fun_a(); ... int fun_b(){ ...
Though C and C++ both prohibit nested functions, a few compilers support them anyway (e.g., if memory serves, gcc can, at least with the right flags). A nested functor is a lot more portable though.