I had a homework to create two stacks from int,and then compare him.
it's good, but if i input like that:
int num;
stack<int> s;
while(cin<<num)
{
s.push(num);
}
second time when i do this to input in another stack,
the program break the input : i can' t input for second stack!!!
But if use stack of char i haven't this problem.
Can someone tell me where is the problem.
PS. to input numbers in two stacks, i can transformate chars into int but it's the hard way i think