I am using the STL container for stack.
I wish to check whether the integer is already in the stack or not before adding it into the stack. If it is in the stack then i do not need to add it. But if it is not in the stack then i need to add it. I do not want to change any element already in the stack during this operation.
I do not know how to do it using standard STL container for stack because there is no built in function which can do it.
Please let me know how can i do it.