+ 3
"You can define a function inside another function”
In C++ challenges, there is a question "You can define a function inside another function”, of which the right answer would be false. However what about the lambda expressions? They are both definable and callable inside functions.
3 Antworten
+ 5
I'm guessing that quiz was based on pre C++11 standards.
And perhaps the quiz poster was strictly referring to actual function definition.
Though by definition your statement that lambda expressions are definable and callable was correct.
+ 3
Perhaps they should have described they are strictly referring to the normal function definition instead of making the people confused.
0
yes you can define function inside another function which is also called nested function