In the last (intptr1==intptr2) operator is not calling the overloaded == function,
Is there any thing wrong in the syntax.
you compare the pointer (you named a class pointer which is really missleading -> don't). To compare the content you have to write ((*intptr1)==(*intptr2)) here
My question is "why is it not calling the overloaded == function", I can compare the pointer address inside the overloaded == function.
I am not getting any compile time error or run time error.
In the previous statements (ptr1!=ptr2), it is calling overloaded != operator and working fine.