Ok i have problem again right at the start. I don't know how to pass vector with index (vector[x]) as function argument. I did this:
Code:
double distance (Paths path[i]) {
double dist, tmp;
for (Dots::size_type j=0; j<path[i].size[];j++) {
tmp += pow((path[i][j].xt - path[i][++j].xt),2) + pow((path[i][j].yt - path[i][++j].yt),2);
}
dist = sqrt(tmp);
return dist;
}
and during compiling i got error that i and path aren't declared in this scope of course. How can i pass it as argument? And i'm not sure about the ++j in the calculation line. In fact i'm quite sure that it is wrong. How can i access the next coordinate if not in this manner?