I did this because I'm not sure how operator overloading works in C++. Is it the same?