c++ script showing while loop