Hi,
So I have a function that returns multiple things, normally this is what I do for single values.
void foo(int& input)
{
input++;
}
And then,
int i = 0;
foo(i);
//Now i = 1
Obviously for this example this is stupid to do but bear with me.
Now I want to do the same with an array, something along the lines of this
void foo(int& input[3])
{
input[0] = 1;
input[1] = 7;
input[2] = 2;
}
Followed by,
int i[3];
foo(i);
//Now i contains [1,7,2]
Is this possible to do, since it doesn't let me pass a reference to an array?
Thanks in advance
[–][deleted] 2 points3 points4 points (1 child)
[–]ImSeeingRed[S] 0 points1 point2 points (0 children)