New course! Every coder should learn Generative AI!
Try a free lesson+ 2
C++ doesnt support nested funcs as far as I know. However, you can use lambda to get the same result.
https://stackoverflow.com/questions/4324763/can-we-have-functions-inside-functions-in-c