1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2003
    La Jolla
    Rep Power

    STL map impl. in C


    Is it possible to index an array using floating point numbers instead of integers (0 through n)? I have an array M in which one of the indices is a floating point number. Previously, I used a dirty work around for conversion of this index into an int (I found out that this is causing a loss in accuracy).

    map<> template in STL can be used to index arrays using strings, floats etc. Is there any implementation of map<> in C? Any help would be appreciated......

    Thanks in advance..
  2. #2
  3. Banned ;)
    Devshed Supreme Being (6500+ posts)

    Join Date
    Nov 2001
    Woodland Hills, Los Angeles County, California, USA
    Rep Power
    I guess you're really looking for some kind of hash table routine that is implemented in C, right? If so, you can try googling for "hash table code C" or something similar. HTH :)
    Up the Irons
    What Would Jimi Do? Smash amps. Burn guitar. Take the groupies home.
    "Death Before Dishonour, my Friends!!" - Bruce D ickinson, Iron Maiden Aug 20, 2005 @ OzzFest
    Down with Sharon Osbourne

    "I wouldn't hire a butcher to fix my car. I also wouldn't hire a marketing firm to build my website." - Nilpo

IMN logo majestic logo threadwatch logo seochat tools logo