Challenge: Operator Overloading
Test your understanding of operator overloading with these coding questions.
We'll cover the following...
We'll cover the following...
Problem 1
In this challenge, you are required to overload the unary negation operator (-) and the subtraction operator (-) for the Vector class.
- Unary Negation (
-vector): Negates all the components of a vector. - Subtraction (
vector1 - vector2): Performs