Function returning an array

 

Hello

I'm trying to create a function which returns an array ?

is that possible ?

if yes does anyone have an example ?

 

thanks

Nicolas 

 

One way is to pass the array with the &sign.

void start(){
    int Count_Down[];  Format_CountDown(Count_Down);
} 

void Format_CountDown( int &Passed_Array[] ){
    ArrayResize( Passed_Array , 10 );
    for( int i=ArraySize( Passed_Array )-1; i>=0; i-- ){
          Passed_Array[i]=i;
    } 
}
 

it works.

Thanks a lot ! 

Reason: