C++: Overloading Arithmetic & Relational Operators
C++ 20
| Expert
- 13 Videos | 1h 45m 49s
- Includes Assessment
- Earns a Badge
Some of the most commonly overloaded operators include binary arithmetic operators, used in operations such as a + b; compound assignment operat+B30ors of the form a+= b; and the prefix and postfix operators of the form a++. In this course, discover how to overload binary arithmetic operators appropriately, so that they support correct semantics in chaining. Learn how to overload compound assignment operators, such as +=. Explore how the C++ compiler differentiates between the pre and post increment operators and how these operators work in various edge cases. When you complete this course, you will be able to confidently leverage std_rel_ops by overloading relational operators.
WHAT YOU WILL LEARN
-
discover the key concepts covered in this courseuse std::rel_ops and implement comparison operatorsreuse code by invoking operators from other operatorsuse the std::rel_ops namespace to have C++ generate operator overloadsoverload the + operatoruse the overloaded + operatorrecognize requirements for + operator overloads
-
perform operator overloading of the += operatoruse the += operator and attempt to return a value typerecognize requirements for += operator overloadsoverload the pre and post increment operatorsuse an overloaded ++ operatorsummarize the key concepts covered in this course
IN THIS COURSE
-
1.Course Overview2m 3sUP NEXT
-
2.Using std::rel_ops7m 49s
-
3.Invoking Operators from Other Operators8m 51s
-
4.Generating Operator Overloads using std::rel_ops11m 24s
-
5.Overloading the + Operator9m 2s
-
6.Using the Overloaded + Operator5m 39s
-
7.Identifying Requirements for + Operator Overloads11m 20s
-
8.Overloading the += Operator8m 46s
-
9.Using the Overloaded += Operator8m 8s
-
10.Identifying Requirements for += Operator Overloads9m 11s
-
11.Overloading the Pre and Post Increment Operators9m 38s
-
12.Using the Overloaded ++ Operator10m 7s
-
13.Course Summary3m 53s
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.