Could someone explain to me why this for-loop only runs one time no matter what n is:
double CalcDist(unsigned int n, Point p, Point* s)
{
    double sd[n];
    for(int i = 0; i < n; i++)
    {
        sd[i] = s[i].Dist_To(p);
        return sd[i];
    }
}
Thanks in advance for any help.
 
     
    