This course introduces you to advanced aspects of handling functions in C++. You'll learn about function pointers, storing functions as variables, and dynamic function operations, such as passing and returning functions, `std::bind`, and its alternatives.
Overview
Syllabus
- Lesson 1: Storing a Function in a Variable
- Storing Functions in C++ Variables Using Pointers and std::function
- Replace Function Pointer with std::function
- Use std::function Instead of Function Pointer
- Space Exploration Thrust Calculation
- Storing and Using Function Variables
- Lesson 2: Implementing a Function that Takes Another Function as an Argument
- Modify filterVector to Return Filtered Vector Instead of Printing
- Quicksort Implementation with a Comparator Function
- Modify Vector Elements with a Function Argument
- Implementing a Reduce Function with Function Arguments
- Transform Elements in a Vector
- Lesson 3: Implementing a Function that Returns a Function
- Fix the Faulty Incrementor Function
- Implement a Multiplier Factory Function
- Exponentiator Function Factory
- Generating Personalized Greetings
- Implement a Function that Returns a Boolean Function
- Lesson 4: std::bind and Its Alternatives
- Binding Function Arguments with std::bind
- Replace std::bind with Lambda Expressions
- Fix the Multiplication Binding
- Bind Multiple Arguments and Create Equivalent Lambda Expressions