Pass array values directly on function call?

 
Hi,

i want to ask if something like this is possible

void my_function(string array[]){


}


//Call the function and pass datas directly

my_function({"text1","text2","text3"});

 
Not possible.
 
  1. Not possible. Individual values are not an array.
  2. Arrays are passed by reference, not by value.
  3. You can only use the type array[]={…}; form with constants.
void my_function(string& array[]){


}

string T[3]; T[0]="text1"; T[1]="text2"; T[2]="text3";
my_function(T);
 

Well you can pass a single value of an array like:

void my_function(string str ) {
    Print(str);
}

//Call the function and pass single data directly
my_function( arr[2] );
Reason: