Jesusemora In languages that support it, nested functions are useful as 'helper functions' that are only called by a single function. e.g. say you are refactoring a function b/c it's too long or complex. You want to extract some of that functionality into some smaller functions. But if you move those smaller functions into the class, it implies that those functions could be called by any other class member function, and that's not always the intent. Declaring a nested function ensures that it can only be called by the outer function that contains it.
You can do something similar in C++ with lambdas, but it's not as readable as nested functions (IMNSHO).