i recently read that we can pass function to a function by using pointer to a function.
i tried with an simple example.i defined sum function and passed it to average function so that it calculated average of return value from sum and 2 more nos..
rather than convenience point of view i found it complicated...is there any application of this concept?:?:
inspire_all
-4
Newbie Poster
Recommended Answers
Jump to PostLook at the STL algorithm header, there is a whole load of functions using this concept, like
std::count_if()
.Also, if you want to compute an integral over a range, I …
All 3 Replies
jaskij
45
Junior Poster in Training
mazzica1
-1
Junior Poster
rubberman
1,355
Nearly a Posting Virtuoso
Featured Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.