Moving this line outside the do while doesn't work on MSVC '13