coordinates min distance c++
<p>Im currently having a small problems , because i need to find the coordinates corresponded to my min distance. 
For example i have a person and three potential stations. I need to find the distance between them and then take the min distance and in the next i have to take the coordinates related to that min distance.
Im sending you my loop just for that part of my program.</p>

<pre><code>for (newCoordinate = newPoints.begin(); newCoordinate != newPoints.end(); newCoordinate++)// here are my three potential stations
{
    distanceBetweenBusCoordinateAndNewPoint = sqrt(pow((busRequest-&gt;x - newCoordinate-&gt;x), 2) + (pow((busRequest-&gt;y - newCoordinate-&gt;y), 2)));// find min
    distances.push_back(distanceBetweenBusCoordinateAndNewPoint);//add to the vector
}
newdis = min_element(distances.begin(), distances.end());// find the min of min
</code></pre>

<p>Thank you for you help!</p>