How to use HASH Function

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • anitha1234
    New Member
    • Oct 2006
    • 8

    #1

    How to use HASH Function

    I want to use HASH function for a simple prg,
    How to use hash function pls help me.
    pls give me a eg. prg also.
    Thanks
  • cyberking
    New Member
    • Jan 2007
    • 84

    #2
    Originally posted by anitha1234
    I want to use HASH function for a simple prg,
    How to use hash function pls help me.
    pls give me a eg. prg also.
    Thanks
    What exactly is a HASH function?? I dont know..

    Is it the preprocessor directive you are talking about??
    Well as far as I know # is used to include header files or to define macros in your program.. Apart from that, i doubt if its used anywhere else...

    eg, #include "stdio.h"; #define SUM 23; #pragma inline; #if......

    Regrads
    CyberKing

    Comment

    • anitha1234
      New Member
      • Oct 2006
      • 8

      #3
      Originally posted by cyberking
      What exactly is a HASH function?? I dont know..

      Is it the preprocessor directive you are talking about??
      Well as far as I know # is used to include header files or to define macros in your program.. Apart from that, i doubt if its used anywhere else...

      eg, #include "stdio.h"; #define SUM 23; #pragma inline; #if......

      Regrads
      CyberKing
      By using Hash function we can turn our data into suitable number.
      i also dont know much about this, but i have some data which has to be
      converted to some no. by using hash function.

      Comment

      • cyberking
        New Member
        • Jan 2007
        • 84

        #4
        check this out..

        http://www.sparknotes. com/cs/searching/hashtables/section2.rhtml

        Comment

        • horace1
          Recognized Expert Top Contributor
          • Nov 2006
          • 1510

          #5
          Originally posted by anitha1234
          I want to use HASH function for a simple prg,
          How to use hash function pls help me.
          pls give me a eg. prg also.
          Thanks
          the C++ STL has class Map which has similar functionally to a hash table
          http://www.cppreferenc e.com/cppmap/index.html
          http://www.cprogrammin g.com/tutorial/stl/stlmap.html

          Comment

          Working...