Possible to have multiple while (cin>>input)
问题 I would like to know if it's possible to have multiple while (cin>>(variable)) as in the following code: #include <iostream> #include <vector> using namespace std; int main() { vector<int> v1, v2; int input; while (cin>>input) v1.push_back(input); while (cin>>input) v2.push_back(input); return 0; } The logic of my program is to let user define the number of elements and value of each element in two sets of int vectors. However, I realized that after entering the first set of numbers for the