C++: Overloading Arithmetic & Relational Operators

C++    |    Expert
  • 13 videos | 1h 45m 49s
  • Includes Assessment
  • Earns a Badge
Rating 4.3 of 8 users Rating 4.3 of 8 users (8)
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 course
    Use std::rel_ops and implement comparison operators
    Reuse code by invoking operators from other operators
    Use the std::rel_ops namespace to have c++ generate operator overloads
    Overload the + operator
    Use the overloaded + operator
    Recognize requirements for + operator overloads
  • Perform operator overloading of the += operator
    Use the += operator and attempt to return a value type
    Recognize requirements for += operator overloads
    Overload the pre and post increment operators
    Use an overloaded ++ operator
    Summarize the key concepts covered in this course

IN THIS COURSE

  • 2m 3s
  • 7m 49s
  • Locked
    3.  Invoking Operators from Other Operators
    8m 51s
  • Locked
    4.  Generating Operator Overloads using std::rel_ops
    11m 24s
  • Locked
    5.  Overloading the + Operator
    9m 2s
  • Locked
    6.  Using the Overloaded + Operator
    5m 39s
  • Locked
    7.  Identifying Requirements for + Operator Overloads
    11m 20s
  • Locked
    8.  Overloading the += Operator
    8m 46s
  • Locked
    9.  Using the Overloaded += Operator
    8m 8s
  • Locked
    10.  Identifying Requirements for += Operator Overloads
    9m 11s
  • Locked
    11.  Overloading the Pre and Post Increment Operators
    9m 38s
  • Locked
    12.  Using the Overloaded ++ Operator
    10m 7s
  • Locked
    13.  Course Summary
    3m 53s

EARN A DIGITAL BADGE WHEN YOU COMPLETE THIS COURSE

Skillsoft is providing you the opportunity to earn a digital badge upon successful completion on some of our courses, which can be shared on any social network or business platform.

Digital badges are yours to keep, forever.

YOU MIGHT ALSO LIKE

Rating 4.4 of 89 users Rating 4.4 of 89 users (89)
Journey C++
Rating 5.0 of 2 users Rating 5.0 of 2 users (2)

PEOPLE WHO VIEWED THIS ALSO VIEWED THESE

Rating 4.4 of 15 users Rating 4.4 of 15 users (15)
Rating 4.4 of 5 users Rating 4.4 of 5 users (5)
Rating 4.1 of 9 users Rating 4.1 of 9 users (9)