As of May 31, 2023, we have updated our Code of Conduct.

Questions tagged [pset4-speller]

The tag has no usage guidance.

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

dictionary is allways null

// Implements a dictionary's functionality #include <stdbool.h> #include <string.h> #include <stdio.h> #include <ctype.h> #include "dictionary.h" // Represents a ...
person the human's user avatar
0 votes
1 answer
28 views

trie speller check() function no mispellings

working on check() function and my trie data type seems to load ok with the full dictionary but check is unable to find any mispellings for a text file. I beleive I'm not correctly returning false ...
Katie Melosto's user avatar
0 votes
0 answers
35 views

CS50IDE Debugger quits at random times

I'm having having trouble with the debugger just vanishing at random points in my code. Its different points every time and will go right past if i start again. Anyone elese had a similar problem?
Rusty's user avatar
  • 1
0 votes
1 answer
26 views

"make" showing error that i've fixed but keeps referencing it

I fixed the error shown in the terminal for line 24, but when I compile my code it keeps popping up again [even though the line it's referencing does not even exist anymore]. dictionary.c:24:15: ...
Katie Melosto's user avatar
0 votes
1 answer
94 views

PSET 4 - Speller Load Function giving SEG Fault at strcpy("cursor->word", word);

while (fscanf(file, "%s", word) != EOF) { // TODO node *cursor = malloc(sizeof(node)); if(cursor == NULL) { unload(); return false; } strcpy("cursor->word",...
Sarabjot Singh's user avatar
0 votes
1 answer
27 views

trie speller works on custom dict but misses mispellings on large dictionary

So my speller works fine with a custom dict, but not with the large dict. This is my code in dictionary.c (haven't modified other files): // Implements a dictionary's functionality #include <...
Daniel's user avatar
  • 3
0 votes
1 answer
682 views

pset4 speller (hash) - check50 showing "handles substrings properly"

The code works but only not passing substring handling. What is the issue exactly? and any clues on solving it? Thanks. check50 output :) dictionary.c, dictionary.h, and Makefile exist :) speller ...
AYA's user avatar
  • 7
0 votes
1 answer
29 views

Speller (hashtable) check-function marks everything as correct

When using a small dictionary, everything is working fine. But with larger ones I'm getting output like this: MISSPELLED WORDS WORDS MISSPELLED: 0 WORDS IN DICTIONARY: 143091 WORDS IN TEXT: ...
silencefog's user avatar
0 votes
1 answer
593 views

When I run valgrind, why do I see more allocs than the number of times I've malloc'ed memory?

I'm on pset 4, speller, using a hash table. I have a while loop in which I malloc memory that a node pointer points to. In the unload function I free this memory. My program works fine in all ...
hli's user avatar
  • 3
0 votes
1 answer
51 views

do not understand why check function checks new word against dictionary

I am trying to implement the check function of Speller in CS50. The code below may or may not work. But the thing that gets me is that I don't understand the bit : if strcasecmp(cursor-> word, ...
stephen Ong's user avatar
0 votes
1 answer
174 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 ...
GAXY's user avatar
  • 1
0 votes
1 answer
57 views

pset4 speller unload trie leaking memory

I can't seem to figure out why my code is leaking memory, I think I have implemented recursion correctly, take a look at my unload code. EDIT : I tried running my file with large dictionary and using ...
Somit Jain's user avatar
0 votes
1 answer
48 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 ...
Somit Jain's user avatar
0 votes
1 answer
3k views

I keep getting the message that 'non-ASCII characters are not allowed outside of literals and identifiers.'

I keep getting the message that 'non-ASCII characters are not allowed outside of literals and identifiers.' I get this message when I compile and it is at the strcpy section. Any help gratefully ...
stephen Ong's user avatar
0 votes
1 answer
34 views

Speller is returning all the words as misspelled while using a hashtable?

Please take a look at my code and help me understand where the problem lies. I have used printf to check that the dictionary is loaded correctly. Also the word that is being checked is same as the ...
Paawan Angra's user avatar
0 votes
0 answers
47 views

Problem with pset4 2019 trie dictionary

I'm having problems with my trie dictionary.c file, if I try to run the whole program normally or through gdb, I'm getting no errors whatsoever and I'm getting the right answers. Tho, when I try to ...
Onion's user avatar
  • 1
0 votes
1 answer
45 views

valgrind() causing IDE to shut down

working on pset4 speller via trie. I AM AWARE OF THE CLANG BUG. According to one of the answers in the original question i removed the -fsanitize flag and ran valgrind() on it while using a small ...
CeNiEi's user avatar
  • 17
0 votes
1 answer
22 views

speller returning random stuff

My program for speller(hashtable) always returns the following: [1mdictionary.c:35:19:[1m[31m runtime error: [1m[0m[1mmember access within null pointer of type 'node' (aka 'struct node')[1m[0m [...
UnderscoreA's user avatar
0 votes
1 answer
139 views

I don't get these errors

Every time I compile speller (hash table) I get these errors: clang -fsanitize=signed-integer-overflow -fsanitize=undefined -ggdb3 -O0 -Qunused-arguments -std=c11 -Wall -Werror -Wextra -Wno-sign-...
UnderscoreA's user avatar