This is a program where it merges 2 vectors into one. As you can see, the program prompts the user to input elements for each vector. However, when I input -1 in order to stop input, it doesn't want to go to the next prompt. Please help?
undeadnexus@ubuntu:~$ ./a.out
Enter numbers for vector a:
1
2
3
4
5
-1
terminate called after throwing an instance of 'std::bad_alloc'
what(): std::bad_alloc
Aborted (core dumped)
undeadnexus@ubuntu:~$ 2
2: command not found
undeadnexus@ubuntu:~$ 3
3: command not found
undeadnexus@ubuntu:~$ 4
4: command not found
undeadnexus@ubuntu:~$ 5
5: command not found
undeadnexus@ubuntu:~$ -1
-1: command not found