0

I've been looking through my code, but I'm unable to figure out why my code keeps seg faulting. I used my own custom hash function to take the first character of each string in the dictionary to 26 buckets in the hash table. Each bucket corresponds to a letter in the alphabet. (A = 0, B = 1, etc). Can you guys take a look at this and let me know where it's going wrong?

[EDIT: code removed for Honor Code compliance. Problem unrelated to code.]

  • Any modifications to other files? I couldn't get it to segfault on my VM. – Blauelf May 17 '19 at 10:51
  • which line of code is causing the seg fault? Yes, you need to isolate that line. It's a debug skill that you need to develop. – Cliff B May 18 '19 at 0:06
  • Yeah, I think for some reason when I compiled it again...it ended up working fine. I'm not sure if it's because I killed the terminal and reopened it or something. Thanks for the input though. – lee3061 May 18 '19 at 0:42

You must log in to answer this question.

Browse other questions tagged .