C++: Getting Started with Operator Overloading

C++ 20    |    Expert
  • 12 Videos | 1h 23m 27s
  • Includes Assessment
  • Earns a Badge
Operator overloading is an unusual language feature that is quite important in C++, enabling you to specify implementations of the standard operators for your user-defined types. You can overload a wide variety of operators, each having a standard meaning for built-in types that can be mimicked in custom types. If used correctly, this can lead to natural, elegant-looking code. Begin this course by learning how to overload simple operators and explore the restrictions around overloading operators. Then, discover how to overload operators as member functions of a class, providing easy access to the internal state of the object. Finally, focus on identifying situations where the member function implementation will not work and investigate best practices of operator overloading.

WHAT YOU WILL LEARN

  • discover the key concepts covered in this course
    outline key concepts of operator overloading
    set up and instantiate classes
    overload the < operator
    use code to overload operators
    inline operator overloads and to use as member functions
  • define operator overloads using non-member functions
    use friend functions with operator overloading
    overload operators with primitive types as the right operand
    recognize stylistic elements of operator overloading
    overload operators with primitive types as the left operand
    summarize the key concepts covered in this course

IN THIS COURSE

  • Playable
    1. 
    Course Overview
    1m 31s
    UP NEXT
  • Playable
    2. 
    Operator Overloading in C++
    7m 22s
  • Locked
    3. 
    Creating Classes in C++
    5m 54s
  • Locked
    4. 
    Overloading Operators
    9m 9s
  • Locked
    5. 
    Using Code to Overload Operators
    10m 7s
  • Locked
    6. 
    Using Overloaded Operators as Member Functions
    5m 54s
  • Locked
    7. 
    Using Non-member Functions to Overload Operators
    7m 13s
  • Locked
    8. 
    Using Friend Functions with Operator Overloading
    5m 3s
  • Locked
    9. 
    Overloading Operators with Primitive Right Operands
    10m 56s
  • Locked
    10. 
    Using Best Practices of Operator Overloading
    7m 23s
  • Locked
    11. 
    Overloading Operators with Primitive Left Operands
    9m 58s
  • Locked
    12. 
    Course Summary
    2m 56s

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.