![]() |
| ||
| Hash Table Implementation 1 Attachment(s) Hi everyone, Since it's the weekend, I can't get assistance from my professor or his assistant until Monday. My deadline for submission is approaching and I'd feel a lot safer getting as much work as I can. I'm implementing a hash table to store strings using linear probing. My implementation results in my program hanging and I would like some insight as to why it's hanging. Any help would be appreciated. I'm sure the problem lies within my linear probing function and/or the comparison of strings. Omitting ! produces a result but the desired one. If you have further questions pm or email at [email removed]. Preview of the HashDef.h I've included all the files necessary to test any modification you might make. Thank you in advance for any help as well as for your time. #ifndef H_HashDef |
| ||
| Re: Hash Table Implementation 1. It seems you don't implement any hash tables. A hash table is a container with insert, find and (may be) erase operations. But I can see only chimerical class - a mix of a fixed data file reading from unknown (for me) source, mysterious linearProbing method and final printing. Do you know that there is a wonderful C++ lexical construct called comment?.. 2. Why the attachment is so big (1M) zip? All sources of your project must have a packed size less than 2-3K... 3. Next time use code tag with a language specifier: [code=cplusplus] ... C++ source codes ... [/code] |
| ||
| Re: Hash Table Implementation Quote:
My program doesn't require me to use any of those functions yet. I couldn't if I wanted to at this moment. The linear probing should just look for the next available and empty slot in the array when collision occurs. My hashfunction assigns a value to hIndex by calculating the ASCII value of the string. I'm currently trying a different approach i thought of this morning. Thanks again for your time. |
| All times are GMT -4. The time now is 10:27 pm. |
Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC