Original Post
In C++ i want to store 3 numbers, i could use an array & i could use names like x,y,z. What is the fastest way?
Quote:And besides that — the compiler will most probably compile it into the same code so there won’t be any difference in speed.
Original post by Roboguy
It doesn't matter which is fastest. Use whichever is easier (based on the variable names you gave, I'm guessing these are coordinates, so using separate variables would very likely be easier).
Quote:
Original post by Tradone
IMO if it's only 3 variables, I think declaring 3 variables would be a more managable approach to solving your problem. because then you would have to memorize your variables by the [#] rather than the name.
This topic has been locked by a moderator. New replies are not allowed.
With your permission, GameDev.net uses analytics cookies to understand how people use the platform. You can accept analytics or continue with necessary cookies only. Learn more