Jump to content
  • Advertisement


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


C++ reference to array

This topic is 5660 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

Important Information

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

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!