When I run the program, the first line of output "Enter a non-negative integer: " shows, and then after an input is typed and enter's pressed the rest of the program doesn't run.
You ask for a number then enter the loop. In this loop, you're expecting the user to input something and then push it to the vector. Then it goes back to the start of the loop, expecting another input from the user.
EDIT: It's not really infinite. If you entered 0 for the input, it'd kick out. However, it's not even prompting the user with any output.