I know that this is a common question but i could not find any solution to this question without using vectors and ctrl + d/c. I have encounter a infinite while loop while using cin to get a unknown amount of integer. the while loop does not stop executing even after a enter in pressed. Thanks a lot!
while(cin >> num)
{
num--;
sizeB = 0;
setB[sizeB] = num;
sizeB++;
}
cin.ignore();
cin.clear();