Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. vector,list and dqueue ?

vector,list and dqueue ?

Scheduled Pinned Locked Moved C / C++ / MFC
graphicsquestion
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • X Offline
    X Offline
    xcavin
    wrote on last edited by
    #1

    Can someone tell me the basic difference between a vector,list and dqueue. just the basic difference is appreciated.

    A 1 Reply Last reply
    0
    • X xcavin

      Can someone tell me the basic difference between a vector,list and dqueue. just the basic difference is appreciated.

      A Offline
      A Offline
      Andrew Walker
      wrote on last edited by
      #2

      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.


      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups