In C the following code works in gcc.
int foo( int foo_var )
{
/*code*/
int bar( int bar_var )
{
/*code*/
return bar_var;
}
return bar(foo_var);
}
How can I achieve the same functionality of nested functions in C++ with the gcc compiler? Don't mind if this seems like a beginner question. I am new to this site.