In my game I want a canon to fire bullets once every second, im half way there but it's getting too complicated for me so I need some help. I made a small example of the bullet code. The code that has been commented causes the program to crash.
counter is always 1 greater than the last bullet you new'd. You should decrement it before the delete. In the if control expression on line 31, you should be checking bulletlist[counter-1]
Line 36 and 39, likewise.
When you have a value that represents the number of items held in an array, it is not a valid index into that array.