I dont understand why it doesnt work like the first vector i can input ok but the program just ends right after that, like it wont let me input values for the second vector.
#include<iostream>
#include<vector>
using namespace std;
int main ()
{
vector<int> a1;
vector<int> b1;
cout << "Enter values for first vector, type Q to quit " ;
int input1;
while ( cin >> input1)
{
a1.push_back(input1);
}
cout << "Enter values for second vector, type Q to quit " ;
int input2;
while ( cin >> input2)
{
b1.push_back(input2);
}
return 0;
}