http://pastebin.com/uftudrTM Can anybody explain why this is giving me no errors, but doesn't fill my array properly? If I use the currently commented out section it works just fine, but this is for a school assignment and I'm suppose to use a function to do this, and I'm not understanding why my array is getting filled with all 0's.