Chapter 10. Operator Overloading

After completing this chapter, you will be able to:

  • Describe what operator overloading is.

  • Decide which classes should support operator overloading.

  • Recognize what you can and can’t overload.

  • Describe guidelines for providing overloaded operators.

  • Explain how to implement operator overloads.

You’ve already seen how to construct classes and structures, provide member functions in your types, and use these functions in applications. In this chapter, you’re going to find out about a special category of member functions called overloaded operator functions, with which you can add extra functionality so that your types can be used more naturally and intuitively.

Note

If you’ve encountered operator overloading in C++ before, ...

Get Microsoft Visual C++/CLI Step by Step now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.