Complex Class with a Friend Function
Explore how to declare and define a friend function for operator + overloading in a Complex class. Understand how this enables addition between Complex objects and doubles, gaining access to private members without using the this pointer.
We'll cover the following...
We'll cover the following...
Challenge
Write a program that implements a Complex class containing an overloaded + operator that can add two Complex objects:
- A Complex and a double
- A double and a Complex