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
Compilers can produce warnings - make the compiler programmers happy: Use them!
Please don't PM me for help - and no, I don't do help over instant messengers.