( clearing ) a modified container

Hello all,
I need to shrink this container like a stack ( FIFO ).
So I thought about queues or stacks which have a member function pop().
Wonderfull, because with "vectorstd" I have erase( position ), but with
queued or stacked vectors I have pop() ( simple ).

Hope you can help.

1
2
3
       std::vector<int> vectorstd;
       std::queue<int, std::vector<int> > qeuedvector;
       std::stack<int, std::vector<int> > stackedvector;

Are you saying you need a container to become empty?
At the end of operations on its values it will hold exactly 9 ints which are used later in the program.
I like the idea of shrinking it down from the front and from the end leaving only the required values.

But this container is reusable, so I thought of restarting with no values in it.
Maybe I'm pushing the enveloppe because I could do all of this with native arrays, but I want to do away
whit loops and indices.

Makes sense ?
> like a stack ( FIFO ).
stack is LIFO
queue is FIFO

> Hope you can help.
¿what's your question?
Topic archived. No new replies allowed.