I am learning stl and learn how to use all stl containers and i need to knew when i have to use deque in my program. what is the different between deque and other stl containers
Asked
Active
Viewed 85 times
-1
-
They are *all* slightly different. That's why there is more than one container type. :-) – Bo Persson Dec 24 '16 at 10:58
-
Welcome to Stack Overflow. Please take the time to read [The Tour](http://stackoverflow.com/tour) and refer to the material from the [Help Center](http://stackoverflow.com/help/asking) what and how you can ask here. – πάντα ῥεῖ Dec 24 '16 at 11:01
1 Answers
-1
http://www.cplusplus.com/reference/deque/deque/
You can push elements to a deque on both ends.
Example: You can use a deque as "history". The oldest items are in front. Now you have easy access on the newest element and the oldest. (It is good for a undo function)

ATFBlueshift
- 24
- 2