Array passed by reference problem

 

I am having trouble with arrays because they can't be returned from a function. So I decided to try this:

int start()
  {
  double array1[];
    Function(array1);
    Print (array1[0]);
  }
void Function (double& array2[])
  {     
    array2[0] = 12.4;
  }

I get no result with arrays of type double. It, however, works with int. Why is that?

Thanks in advance!

 
nikip3 wrote >>

I am having trouble with arrays because they can't be returned from a function. So I decided to try this:

I get no result with arrays of type double. It, however, works with int. Why is that?

Thanks in advance!

define the dimension of yr arrays

 

That was quick- thanks!

double array1[10];
It works now.