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. Hash function c++

Hash function c++

Scheduled Pinned Locked Moved C / C++ / MFC
c++helpcsharplinux
3 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.
  • M Offline
    M Offline
    Ming Luo
    wrote on last edited by
    #1

    Dear all: I am trying to use the hash_map in C++ in VS2005.NET. The code is like: #include ... ... hash H; size_t h = H("ca"); I want to generate the hash value for the string. This code works perfectly in Linux but in VS2005 it complains that: 1>d:\project\vs2005\c++\gmesh\gmesh\ml_geodesic_gridpoint_index.cpp(54) : error C2065: 'hash' : undeclared identifier 1>d:\project\vs2005\c++\gmesh\gmesh\ml_geodesic_gridpoint_index.cpp(55) : error C3861: 'H': identifier not found It seems that the compiler can't find the hash definition. Does anyone have idea to solve this problem for me please? Thanks

    Asura

    D 1 Reply Last reply
    0
    • M Ming Luo

      Dear all: I am trying to use the hash_map in C++ in VS2005.NET. The code is like: #include ... ... hash H; size_t h = H("ca"); I want to generate the hash value for the string. This code works perfectly in Linux but in VS2005 it complains that: 1>d:\project\vs2005\c++\gmesh\gmesh\ml_geodesic_gridpoint_index.cpp(54) : error C2065: 'hash' : undeclared identifier 1>d:\project\vs2005\c++\gmesh\gmesh\ml_geodesic_gridpoint_index.cpp(55) : error C3861: 'H': identifier not found It seems that the compiler can't find the hash definition. Does anyone have idea to solve this problem for me please? Thanks

      Asura

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

      Ming Luo wrote:

      It seems that the compiler can't find the hash definition. Does anyone have idea to solve this problem for me please?

      Does the hash_map file exist? Can the compiler find it? If you right-click the #include statement, can you opt to open the file?

      "Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman

      "To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne

      C 1 Reply Last reply
      0
      • D David Crow

        Ming Luo wrote:

        It seems that the compiler can't find the hash definition. Does anyone have idea to solve this problem for me please?

        Does the hash_map file exist? Can the compiler find it? If you right-click the #include statement, can you opt to open the file?

        "Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman

        "To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne

        C Offline
        C Offline
        CPallini
        wrote on last edited by
        #3

        DavidCrow wrote:

        Does the hash_map file exist?

        Indeed it exists (at least on my system, VS2005). On the other there's no hope to find the hash class itself (again, on my system). :)

        If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
        [my articles]

        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