
15 Aug
2008
15 Aug
'08
4:14 p.m.
Daryle Walker wrote:
I'm going to redo the "hat" project I have in the sandbox. It currently is a brand new container design; I want to change it into an adaptor, like std::stack.
Hmm, as I was writing this, I thought of an alternative. Maybe I could use a deque,
Or a vector.
but swap the found element with the rear one before popping. Then erasure would be cheaper. Would that work?
Yes, that is certainly the right way to do it. Phil.