First-class Functions in C++: Defining & Using First-class Functions
C++ 17
| Expert
- 11 Videos | 1h 9m
- Includes Assessment
- Earns a Badge
While C++ is considered an object-oriented language, it provides support for functional programming, including support for first-class functions in three manners: function pointers, function objects, and lambdas. In this course, discover the complexity of C-style function pointers by creating them and invoking functions through them. Next, learn about the various features and uses of function pointers and how to accept functions as input arguments and return functions from a higher-order function. Finally, examine function objects (functors) and use them to overload the call operator, instantiate objects, and use the overloaded call operator. Upon completion, you'll be able to list the properties of C++ first-class functions, create function pointers, return functions from a higher-order function, and define and invoke a functor.
WHAT YOU WILL LEARN
-
discover the key concepts covered in this coursedefine function objects and function pointerscreate function pointers and invoke functions through theminvoke various functions through function pointers and identify the features and uses of function pointersreturn functions from other functionsuse and differentiate typedefs and type aliases
-
Pass and accept functions as input argumentsutilize templates with higher-order functions and type aliasescreate and use function objects (functors)use functors with templatessummarize the key concepts covered in this course
IN THIS COURSE
-
1.Course Overview1m 49sUP NEXT
-
2.First-class Functions in C++5m 38s
-
3.Creating Function Pointers7m 57s
-
4.Invoking Functions through Function Pointers8m 47s
-
5.Returning Functions from Other Functions7m 30s
-
6.Using Typedefs and Type Aliases5m 6s
-
7.Passing Functions in as Input Arguments6m 7s
-
8.Utilizing Templates with Higher-order Functions6m 34s
-
9.Creating and Using Functors6m 22s
-
10.Using Functors with Templates9m 29s
-
11.Course Summary3m 43s
EARN A DIGITAL BADGE WHEN YOU COMPLETE THIS COURSE
Skillsoft is providing you the opportunity to earn a digital badge upon successful completion of this course, which can be shared on any social network or business platform
Digital badges are yours to keep, forever.