right, any variable that you use outside of the loop (even if by pointer) must be declared outside of the loop, that goes for if blocks too.