But that's the only explanation!

The problem is here



bool friend operator < (const MyObj &Ob1, const MyObj &Ob2)
{
if(Ob1.value < Ob2.value)
...