As you know in C++ one is able to have variables assigned based on a user input via std::cin.
When using std::cin ,if I recall correctly, when there are too many inputs that what is required, then the extra inputs are ignored.
int main(){
int a, b;
std::cin >> a >> b;
std::cout << a << " " << b << endl;
return 0;
}
Input : 2 4 9 16 32
Output : 2 4
I am looking to still use the excess information from the user.How does one store the remaining inputs if one doesn't know the amount of excess inputs that the user will type?