I overloaded addition operator in the class P1 to make the instances can be added together directly. However, memory error happens when doing p1 + p2.
P1
p1 + p2