C++: Comparing sets of points in a data file
<p>I have a data file consisting of three columns, x, y, and z (these are numbers). I'd like to do the following:</p>

<ol>
<li>Compare each (x, y) set in the data. </li>
<li>If two sets are equal, say (x1, y1) = (x2, y2),</li>
<li>Then, compare z1 and z2. And depending on the comparison, I'll write a condition and I want to overwrite one of the sets such that it takes the value of the one that pass some conditions I make. </li>
</ol>

<p>The data contains thousands of points, so I'm not sure how to do the comparison effectively, and how to overwrite or omit the point that doesn't pass that conditions.</p>

<blockquote>
  <p>So can someone please suggest something, or give a small
  example for the case where I have only two points (x1, y1, z1) and (x2, y2, z2).</p>
</blockquote>
