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. Is this array of 2D vectors?

Is this array of 2D vectors?

Scheduled Pinned Locked Moved C / C++ / MFC
questiongraphicsdata-structures
2 Posts 2 Posters 4 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.
  • S Offline
    S Offline
    Sk Azraf Sami
    wrote on last edited by
    #1

    vector> mark[5]

    Is this array of 2D vectors? How can I traverse or insert any element from user in this data structure?

    L 1 Reply Last reply
    0
    • S Sk Azraf Sami

      vector> mark[5]

      Is this array of 2D vectors? How can I traverse or insert any element from user in this data structure?

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      Try breaking it down into its constituent parts:

      mark is an array of 5 elements.
      Each element is a vector.
      And each element of the vector is also a vector.
      And each element of the inner vectors is an integer.

      As it stands though, the array is null, so you need to initialise each of its elements with a new vector. You then need to decide what actual information you want to store in the vectors.

      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