two integers and a callback function void performOperation(int a, int b, const std::function<int(int, int)>& callback) { // Call the callback function with the provided integers int result = callback(a, b); // Print the result std::cout << "The result of the operation is: " << result << std::endl; } int main() { // Define the lambda function for summing two numbers auto sum = [](int a, int b) -> int { return a + b; }; // Define the lambda function for subtracting two numbers auto extract = [](int a, int b) -> int { return a - b; }; // Use the lambda function for summing as a callback performOperation(5, 3, sum); // Should print "The result of the operation is: 8" // Use the lambda function for extracting as a callback performOperation(5, 3, extract); // Should print "The result of the operation is: 2" return 0; }