Questions tagged [pset4-speller-hashtable]

Filter by
Sorted by
Tagged with
0
votes
1answer
46 views

on pset4 speller load() struggling to understand if populating dictionary correctly and how to check hashtable

I am building my load() function and I'm wondering if I'm building it so that it is indeed storing the dictionary words correctly. I tried printing both: printf("%s\n", new_node->word); //to see ...
0
votes
1answer
67 views

56 bytes are not being freed

There are 56 bytes that are not being freed. ==600== 56 bytes in 1 blocks are definitely lost in loss record 1 of 2 ==600== at 0x4C2FB0F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-...
0
votes
1answer
44 views

Help with unloading my dic

I have been trying speller for far too long now and need help with unloading the dictionary. This is the code I have now // Unloads dictionary from memory, returning true if successful else false bool ...
0
votes
1answer
61 views

Why are the words not loading into my dictionary?

Well i'm not even sure how I can test this but I have a strong feeling that my speller is not even loading the words on to my dic. Can anyone tell me why? The program compiles and runs. // Loads ...
0
votes
0answers
23 views

Speller compiles but doe not work

My Speller hastable compiles but just does not work. Any advice gratefully accepted // Implements a dictionary's functionality #include <ctype.h> #include <stdbool.h> #include <...
0
votes
1answer
19 views

Pset4 Speller (Hash table) word count only fails in check50

All of the "WORDS IN DICTIONARY: " parts are resulting in "0" but when i run the code on my computer trying both the "small" and "large" dictionary it seems to work perfectly. So what might be the ...
0
votes
1answer
141 views

Pset4 Memory Leak in Speller

I'm working on Speller with a hashtable, and my code compiles, but when I run valgrind it tells me that I'm trying to use an uninitialized value. ==10864== Conditional jump or move depends on ...
0
votes
1answer
74 views

Pointer initialization in Load function (pset4 Speller)

When in my load function, I insert a node at the front of a linked list: If I declare and initialize a pointer as the new 'head' node, my code compile but every word in the text is found to be ...
0
votes
1answer
86 views

Speller (Hashtable) - traversing linked list returns null beyond first node

my check function is returning an incorrect amount of misspelled words. I created test.txt file containing all and only the words in my small dictionary. Yet check is returning matches only for the ...
0
votes
1answer
41 views

Pset4 speller segmentation fault in check functions when using larger files like holmes.txt

I updated my hash function to make the code faster, it makes a hash table and stores word with the same first three letters in one linked list, i.e words starting with aaa will go together, words ...
0
votes
1answer
120 views

pset 4 - Speller hash table - unload memory not working

Good afternoon Hitting the last hurdle with unloading memory, can't figure where I'm going wrong Code to load the hash table: // Loads dictionary into memory, returning true if successful else ...
0
votes
1answer
70 views

PSET 4 - Memory allocation

everyone I'm finishing up pset4 with a hashtable, but Valgrind is giving me two different headaches. One of them has to do with this famous 32 bytes, which apparently is some kind of clang bug so I'...
0
votes
1answer
44 views

Valgrind error on pset4

My question is about an error I am getting on check50 from memory errors. I am passing all other checks and when I compare my solution with the staff solution - I match 100%. I am struggling to get my ...
0
votes
1answer
51 views

Segmentation fault - Pset4 Speller

My code has a segmentation fault and always prints this out: MISSPELLED WORDS dictionary.c:111:19: runtime error: member access within null pointer of type 'node' (aka 'struct node') Segmentation ...