Homework assignment, eh? ![]()
As Blue ink said, when testing for equality, you use the == operator. = is an assignment operator.
if a == b means if the value of a is equal to the value of b.
a = b means assign the value of a to b.
Now, after doing a = b, a == b will always return true.
When you get to overloading operators in your course, you can of course change the behavior either of these operators.
C