Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

Kurioes

C++ reference to array

This topic is 5206 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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?

Share this post


Link to post
Share on other sites
Advertisement

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!