Basically, my intention is to do something like this:
1 2 3 4
while (stack.push(cin.get()))
{
cout << "\nInteger " << stack.peek() << " was put onto the stack.\n";
}
The stack is an abstract data type I made; it's self-explanatory if you know stacks. The loop keeps adding the inputted integers until a non-integer is typed.
The problem is the cin.get(). I have no idea how to take direct command line input and make it an integer. cin.getline() doesn't work, either. And I can't do atoi(cin.get()) (or any variation) to convert cin.get()'s ASCII value to its character.
I feel braindead right now; I don't think atoi would work; there's no casting as a string...