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. Alternative for CMap in MFC

Alternative for CMap in MFC

Scheduled Pinned Locked Moved C / C++ / MFC
c++
5 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.
  • R Offline
    R Offline
    Ramasani
    wrote on last edited by
    #1

    i need alternative code for CMap is it possible to implement my own CMap wrapper Class using the STL::map

    Hi this Ravinder

    C 1 Reply Last reply
    0
    • R Ramasani

      i need alternative code for CMap is it possible to implement my own CMap wrapper Class using the STL::map

      Hi this Ravinder

      C Offline
      C Offline
      Cedric Moonen
      wrote on last edited by
      #2

      I don't really understand your question but a std::map is an alternative for the MFC CMap (in fact, I much prefer the STL containers than the MFC containers).

      Cédric Moonen Software developer
      Charting control [v1.5] OpenGL game tutorial in C++

      A 1 Reply Last reply
      0
      • C Cedric Moonen

        I don't really understand your question but a std::map is an alternative for the MFC CMap (in fact, I much prefer the STL containers than the MFC containers).

        Cédric Moonen Software developer
        Charting control [v1.5] OpenGL game tutorial in C++

        A Offline
        A Offline
        Arman S
        wrote on last edited by
        #3

        ... in addition, perhaps the biggest difference is that CMap uses hashing for its keys, and std::map uses key comparisons to store them in some sorted order.

        -- Arman

        R 1 Reply Last reply
        0
        • A Arman S

          ... in addition, perhaps the biggest difference is that CMap uses hashing for its keys, and std::map uses key comparisons to store them in some sorted order.

          -- Arman

          R Offline
          R Offline
          Ramasani
          wrote on last edited by
          #4

          Need the wrapper class for CMap using the STL map(Because i have some problems using CMap i want the same functionality of CMap but internally i have to use map)

          Hi this Ravinder

          A 1 Reply Last reply
          0
          • R Ramasani

            Need the wrapper class for CMap using the STL map(Because i have some problems using CMap i want the same functionality of CMap but internally i have to use map)

            Hi this Ravinder

            A Offline
            A Offline
            Arman S
            wrote on last edited by
            #5

            So you need the interface of CMap and the implementation of std::map..? If so, then you need to declare your own CMyMap with an std::map member variable declared in it, and try to implement CMap similar functions in your CMyMap. However, you cannot simulate hash code related functions of CMap via a std::map.. Did I understand your problem correctly?

            -- Arman

            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