Skip to main content
gamedev.net
🔒 Locked

C++ reference to array

Started by Kurioes Apr 16, 2004 at 7:59 AM 1 replies 750+ views
Original Post
Kurioes
Kurioes
I''m trying to have a function accept a reference to an array like so; void func(const float &array[3]); The problem is the error this generates; "arrays of references illegal" but I want to use references of arrays instead. I just want to pass an array of floats (or whatever) as "quicly" as possible; I''m not sure if this is the right way to so (maybe when passing arrays to functions they don''t get copied?) so does anyone have any hints for me?
Jingo
Jingo
void func(const float (&array)[3]);

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.