im having trouble making function which takes in two integers, two dynamic arrays and the arrays size.
1 2 3 4 5 6 7 8 9 10 11
This is the decleration
int shortest_distance(hnit loc1, hnit loc2, int *p, int *p1, int size);
int n, dogs;
cin >> n >> dogs;
cin >> refur.location.x >> refur.location.y;
hundar = new hnit[dogs];
and this is in the main where im having trouble calling the function
int s_d = shortest_distance(fox.location.x, fox.location.y, hundar, hundar, dogs);
using namespace std;
struct hnit
{
int x;
int y;
};
struct fox
{
bool escaped;
bool caught;
hnit location;
};
void print_fox(fox a);
hnit get_location(fox a);
bool on_boundary(hnit xy, int size);
double calculate_distance(hnit loc1, hnit loc2); punkta
//double calculate_distance(int x1, int y1, int x2, int y2);
int shortest_distance(hnit loc1, hnit loc2, int p[], int p1[], int size);
////////////////
int main()
{
fox refur;
hnit *hundar;
int n, dogs;
cin >> n >> dogs;
cin >> refur.location.x >> refur.location.y;