> can i simply do pt1 == pt2
Yes.
> i have read that you can't compare two pointers unless they point to elements of same array.
That refers to say
But not thisCode:int arr[10]; if ( &arr[i] < &arr[j] )
Code:int i, j; if ( &i < &j ) /* this is meaningless */