The code executes absolutely correctly as I would expect it to, but when I quit the program, I get a buffer overrun error.
I can't understand the where this is coming from and seems unusual that it only comes at quitting the program, even though it all executes fine..
Any help would be appreciated (compiler is VC++ 2010)
Yes ok, now I get no buffer overrun error... but I had already tried this
When I start the array at 0, the addition fails. I can't see why this is, but the results at the end of the program are incorrect, wheras in the first example, despite the buffer overrun, the results are correct