So lets say I have a function which accepts an array:
I can pass data to it like this:Code:void Foo(int* data);
But I don't like the way I've got to initialize a variable when I just want to send some static data. What I want to do is call the function like this:Code:int[] data = {1,2,3}; Foo(data);
Except that doesn't work. How can I pass an array to a function without setting it up in a variable beforehand?Code:Foo((int[]){1,2,3});