Quote Originally Posted by Raigne View Post
Won't the static variable only allow the loop to execute once? Unless the function changes cntr back to 0 at the end. Because once the loop executes the first the the static is initialized, so it will not initialize again. Or am I completely wrong?
No, the for-loop will execute the initialization step every time.

--
Mats