Quantcast
Channel: GameDev.net
Viewing all articles
Browse latest Browse all 17560

array getting filled with trash values

$
0
0

I initiate an array in a function and check the values within that array right after initialisation and everything is fine, down the road after some code is executed, I check the values again they are modified even though I haven`t touched the array (no direct edit of values). What`s causing this? do I need to place the initialisation outside the function so that the array doesn`t get affected by whatever goes wrong in the said function?


Viewing all articles
Browse latest Browse all 17560

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>