SIR I AM CONFUSEED HOW DO WE PASS A DIFF NAME OF A FUNC AS A PARAMETER
CAN U PLEASE BRIEF
THANX
FUNC AS PARAMETER
SIR I HAVE NOT STUDIED VECTORS YET I AM AT INITIAL LECTURES OF COMPARATOR I AM NOT ABLE TO UNDERSTAND THE PROVIDEDE ARTICLE CAN U GIVE SIMPLE EXAMPLER
the way we pass any variable to any function in similar way we pass any function to some other function.
check this example code->
here we have two function one is hi and other is f.
function hi has cout<<“hello” statement ,so it will print hello whever it will be called.
function f is a function which is taking another funtion ( hi function) as argument .
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.