Hash Tables

This is a discussion on Hash Tables within the C++ Programming forums, part of the General Programming Boards category; Hey everyone. I'm a new programmer, just started C++ about a month ago and I've been using Matlab for about ...

  1. #1
    Registered User
    Join Date
    Jun 2008
    Location
    Houston, Texas
    Posts
    43

    Hash Tables

    Hey everyone.

    I'm a new programmer, just started C++ about a month ago and I've been using Matlab for about three years now. My job this summer requires me to learn some C++ for some string analysis work.

    Part of the method involves building a huge library of short strings. With my Matlab background, I wrote an algorithm that simply collects them all in a large vector array and then searches through them one line at a time. Easy, done, give me my A and let me move on.

    But there's a problem. I need to do this is C++, which is not nearly as good as Matlab is for matrix manipulations. The idea of using a hash table came up. Now, my boss knows his stuff pretty well, so I'm inclined to believe that he knows what he's talking about.

    Now, I've done my prerequisite background googling on hash tables and read a few pages. However, I usually find that forums are the best place for information like this. If anyone has any sites that are good, I'd appreciate them. Also, any little tips or tricks, suggestions as to what libraries or commands I should be looking into would be appreciated as well.

    Thanks a lot guys.

  2. #2
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    22,274
    If your compiler has a TR1 implementation, you can use std::tr1::unordered_set and std::tr1::unordered_map. If not, you should be able to get an implementation from Boost.
    C + C++ Compiler: MinGW port of GCC
    Version Control System: Bazaar

    Look up a C++ Reference and learn How To Ask Questions The Smart Way

  3. #3
    Registered User
    Join Date
    Jun 2008
    Location
    Houston, Texas
    Posts
    43
    Sounds good, I'll look into that.

    Thanks for your time

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Iterable hash tables
    By OnionKnight in forum Tech Board
    Replies: 5
    Last Post: 07-21-2008, 03:02 AM
  2. developing hash tables in the C Programming language
    By w108dab in forum C Programming
    Replies: 1
    Last Post: 05-20-2008, 12:20 PM
  3. need help with hash tables with direct chaining
    By agentsmith in forum C Programming
    Replies: 4
    Last Post: 01-05-2008, 04:19 AM
  4. Group Project Help/Volunteer
    By DarkDot in forum C++ Programming
    Replies: 3
    Last Post: 04-25-2007, 12:36 AM
  5. Problems with Hash Tables
    By Zildjian in forum C Programming
    Replies: 6
    Last Post: 11-06-2003, 08:53 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21