#include <iostream>
#include <string>
using namespace std;
double distance(double x[],double y[]){
return sqrt((y[0]-x[0])*(y[0]-x[0])+(y[1]-x[1])*(y[1]-x[1]));
}
int main(){
double d;
double x[]={1,2};
double y[]={4,3};
cout<<distance(x[2],y[2])<<endl;
//cout<<d<<endl;
cin.get();
return 0;}
why wont it work
I also tried
d=distance(x[],y[]);
cout<<d<<endl;
but it wont work either