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. Doubts on Map

Doubts on Map

Scheduled Pinned Locked Moved C / C++ / MFC
performancehelplounge
6 Posts 3 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.
  • F Offline
    F Offline
    FarPointer
    wrote on last edited by
    #1

    Hi , My Problem goes like this -: 1. I want to store similar set of data together . 2. so that wen i ask for a certain type i get the whole set. 3. Wen we are storing the data we dont know how many such set will come. Basically i want to group devices of same type(same name) together, and i get them in random order. How should i approach this so that i wont have any performance hit , while retreiving Regards, FarPointer -- modified at 13:42 Thursday 20th April, 2006

    V D 2 Replies Last reply
    0
    • F FarPointer

      Hi , My Problem goes like this -: 1. I want to store similar set of data together . 2. so that wen i ask for a certain type i get the whole set. 3. Wen we are storing the data we dont know how many such set will come. Basically i want to group devices of same type(same name) together, and i get them in random order. How should i approach this so that i wont have any performance hit , while retreiving Regards, FarPointer -- modified at 13:42 Thursday 20th April, 2006

      V Offline
      V Offline
      valikac
      wrote on last edited by
      #2

      map of vector Kuphryn

      F 2 Replies Last reply
      0
      • V valikac

        map of vector Kuphryn

        F Offline
        F Offline
        FarPointer
        wrote on last edited by
        #3

        Any Links to know more Regards, FarPointer

        1 Reply Last reply
        0
        • V valikac

          map of vector Kuphryn

          F Offline
          F Offline
          FarPointer
          wrote on last edited by
          #4

          Yup i got your idea i will let you know . Regards, FarPointer

          1 Reply Last reply
          0
          • F FarPointer

            Hi , My Problem goes like this -: 1. I want to store similar set of data together . 2. so that wen i ask for a certain type i get the whole set. 3. Wen we are storing the data we dont know how many such set will come. Basically i want to group devices of same type(same name) together, and i get them in random order. How should i approach this so that i wont have any performance hit , while retreiving Regards, FarPointer -- modified at 13:42 Thursday 20th April, 2006

            D Offline
            D Offline
            David Crow
            wrote on last edited by
            #5

            FarPointer wrote:

            1. I want to store similar set of data together .

            Are you talking about a struct, or an array?

            FarPointer wrote:

            3. Wen we are storing the data we dont know how many such set will come.

            Ok, so just allocate memory dynamicaly. Some classes handle this automatically.


            "Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain

            "There is no death, only a change of worlds." - Native American Proverb

            F 1 Reply Last reply
            0
            • D David Crow

              FarPointer wrote:

              1. I want to store similar set of data together .

              Are you talking about a struct, or an array?

              FarPointer wrote:

              3. Wen we are storing the data we dont know how many such set will come.

              Ok, so just allocate memory dynamicaly. Some classes handle this automatically.


              "Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain

              "There is no death, only a change of worlds." - Native American Proverb

              F Offline
              F Offline
              FarPointer
              wrote on last edited by
              #6

              Thanx for the reply . it was basically an implementaion of map of vector as told by kuphyer. It was storing an object of type CMyDevice{ CString szName ; CString szDevice;....}; on the basis of same name in CMyDevice. Regards, FarPointer

              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