while(cin >> buffer)
int buffer;
while(cin >> buffer) {
// do anything
} this breaks if a character is entered instead of an int.
why? how can it be avoided? should it be?
what i'm trying to do is have the user enter a bunch of integers and collect them into a dynamic array (done), but perform various functions when user enters letters (p to print, q to quit, etc.)
thanks
