Every iteration of the loop creates a local variable x
and initializes it to the next element of vec
. When the loop iteration ends, x
goes out of scope. A single x
is never modified.
See this link for the precise semantics.
Every iteration of the loop creates a local variable x
and initializes it to the next element of vec
. When the loop iteration ends, x
goes out of scope. A single x
is never modified.
See this link for the precise semantics.