I need help with a Unix C++ program. I'm working on an email filter for a course that should read the keyword from a text database as well as it's location in the email header.
I want to be able to do this using associative arrays or hash tables because when I run sequentially through an array of strings comparing to see whether the keyword exists in the strings, it takes forever.
Also I'd like some way of storing the keyword and also it's location. But i'd like to be able to do it using only one table or array or whatever, instead of one table holding the keyword and one table for the corresponding email location. I did this before using Associative arrays in Perl but I don't know if C++ has something like that.
Does STL have something like that? or is hash tables it? If hash tables is it, can someone tell me how to use a hash table cuz I can't find anything on the net, except some scattered documents.
thanks in advance...
Kenneth
I want to be able to do this using associative arrays or hash tables because when I run sequentially through an array of strings comparing to see whether the keyword exists in the strings, it takes forever.
Also I'd like some way of storing the keyword and also it's location. But i'd like to be able to do it using only one table or array or whatever, instead of one table holding the keyword and one table for the corresponding email location. I did this before using Associative arrays in Perl but I don't know if C++ has something like that.
Does STL have something like that? or is hash tables it? If hash tables is it, can someone tell me how to use a hash table cuz I can't find anything on the net, except some scattered documents.
thanks in advance...
Kenneth