Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and medical aesthetics - I wrote a for loop in vs20 13. There are two plastic variables I and J in the for cycle, let j=i+ 1. Why does this happen every time I report an error?
I wrote a for loop in vs20 13. There are two plastic variables I and J in the for cycle, let j=i+ 1. Why does this happen every time I report an error?
The problem lies in J's cycle. Now J has been cycled, and the value of J is changed by j=i+ 1, and the result is infinite cycle.

Solution: Introduce new parameters. For example, int k, replace j=i+ 1 with k=i+ 1, so that the cycle can proceed smoothly.