How do I return an array from a function in C++

downhiller80

Platinum Member
Apr 13, 2000
2,353
0
0
I've tried defiing the function as

float[3] getnormal(float[3] v)

or

float[] getnormal(float[3] v)

but neither of these works.

Seb
 

Electric Amish

Elite Member
Oct 11, 1999
23,578
1
0
Yeah, return a reference pointer. Also, the name of the array is already, by definition, a pointer to the array.

amish