List several advantages function objects provide over function pointers.

What will be an ideal response?


The compiler can inline a function object’s overloaded operator() to improve performance.
Since they’re objects of classes, function objects can have data members
that operator() can use to perform its task.

Computer Science & Information Technology

You might also like to view...

We wish to modify a class while keeping it backward compatible. Which of the following can we successfully do?

A. Remove a function. B. Change a function’s return type from a float to a char C. Add another parameter to a function D. Add a new function to the class

Computer Science & Information Technology

If you need to change an attachment to another file within a contact, select the original file and then tap or click ____ on the ribbon.

A. MOVE B. EDIT C. INSERT D. CHANGE

Computer Science & Information Technology

The ___________________ function appends a source string to the end of a destination string.

Fill in the blank(s) with the appropriate word(s).

Computer Science & Information Technology

To insert a SmartArt graphic into a worksheet, click the Insert tab, then click the Insert a SmartArt Graphic button in the _____ group.?

A. ?Illustrations B. ?Graphic C. ?Picture D. ?Object

Computer Science & Information Technology