vector,list and dqueue ?
C / C++ / MFC
2
Posts
2
Posters
0
Views
1
Watching
-
Can someone tell me the basic difference between a vector,list and dqueue. just the basic difference is appreciated.
They all have slightly different performance specifications and operations which make them suitable for different tasks. std::vector is a dynamic array std::list is a doubly linked list std::deque is a hybrid container which is like a list of vectors (from memory) By default, use a vector. If you need to add to the front and the back, use a deque. If you need to be able to insert/remove efficiently from the middle of a container, and never need random access use a list.