I'm not sure why but both my functions are couting garbage on certain elements for only a temporary period of time. I can't figure it out. Is it the way I am initializing the vectors? It is happening in both my functions but not in a similar third function (not shown)... Any ideas?
CODE: http://pastebin.com/d1483aeeb