With std::queue I've been using this:
std::queue<int>::iterator pos = std::find( q.begin(), q.end(), 5);
But when I try that with std::stack :
std::stack<int>::iterator pos = std::find( s.begin(), s.end(), 5);
I get
error: ‘iterator’ is not a member of ‘std::stack<int, std::deque<int, std::allocator<int> > >’
Anyone know how to do this?
Thanks,
Dave