Questions tagged [week5]

The tag has no usage guidance.

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

Everything is correct in my Check50 but in program I have other ERRORS - PSET05 Speller

I hope you're doing well and I also hope you might help me. When I run my CHECK50 in my speller program. Everything is correct all green, but when I run my program or valgrind I have some errors. And ...
AlvaroAndLukeTheCoder's user avatar
0 votes
0 answers
51 views

What Am I Doing Wrong? - Inheritance LAB05-(free_family function)

I've been doing the Inheritance Lab05, I've completed the create_family function. And I've been struggling a bit with the free_family function, I've freed all the allocated memory that the ...
AlvaroAndLukeTheCoder's user avatar
0 votes
0 answers
10 views

Abstract data types and data structures

I just rewatched week5 and I'm a bit confused about the difference between abstract data types and data structures. so apparently abstract data types and data structures are conceptually opposite but ...
Sin's user avatar
  • 1
0 votes
0 answers
63 views

cs50ai traffic.py has all requirements already satisfied from requiremnts.txt but keep getting ImportError: libGL.so.1

I have all requirements installed to run traffic.py but every time I run it, I get the following error message when I run python traffic.py gtsrb or python traffic.py gtsrb-small. "ImportError: ...
Mladen Kajasa's user avatar
0 votes
1 answer
49 views

Speller outputs all words as misspelled

I currently am doing the Week 5 Speller project. My code outputs all words as misspelled. I think it has to do with the load() function, but I am not sure if or why it is doing that. I don't think ...
Yash-902's user avatar
0 votes
1 answer
371 views

Pset 5: Code can't handle basic words and substrings properly

When I run my code, there is only one word in dictionary, so I am assuming that there is a problem with my load function, but I can't find where the problem is. Thank you! :) dictionary.c, ...
Siwon Lee's user avatar
0 votes
1 answer
48 views

speller giving error on valgrind, using 4 bytes of memory that isn't yours...indexing an array out of bounds

I think the problem with is the load() function, here is my code: bool load(const char *dictionary) { char *s = malloc(LENGTH + 1); FILE *f = fopen(dictionary, "r"); if (f == NULL) { return false;...
Musical_Ant's user avatar
0 votes
1 answer
165 views

Replacement of string with char* in any general case

Take a simple program where i want to count the number of vowels in a string, this i've easily implemented using string.h. But when i try that with char*: #include <stdio.h> int main(void) { ...
Musical_Ant's user avatar
0 votes
1 answer
1k views

Week 5 Speller Check function

I am attempting to complete week 5's "Speller" but it is not working. It compiles, but it seems that it does not check properly. My check function may be incorrect, but I cannot tell. I end up with "...
R_C's user avatar
  • 115
0 votes
1 answer
48 views

PSET5 speller: all words listed as mispelled and check50 gives substrings a sad face

I made my dictionary.c for my speller program, however... it lists the whole text as mispelled check50 gives a sad face for substrings, showing that in its testing, "cat" is listed as mispelled, ...
Ubuntu NutCracker's user avatar
0 votes
1 answer
60 views

Cs50 speller load trie failed implementation

/** * Implements a dictionary's functionality. */ #include <stdbool.h> #include <ctype.h> #include <stdio.h> #include <sys/resource.h> #include <sys/time.h> #include &...
ssk4988's user avatar
0 votes
1 answer
32 views

Week 5 - Speller. Instance remaining as NULL after setting inside function

I create an instance of a struct, wordTree, at the base level of my dictionary.c file. When the load function is called, the intention is that this instance gets created, and "branches" are then added ...
Andrew's user avatar
  • 105
0 votes
1 answer
373 views

typedef struct declarations?

In Week 5 Linked Lists/etc... are talked about. In the stacks/queue's the structs are defined like: typedef struct { int size; int capacity; } stack; whereas he defines the "node" struct as: ...
msmith1114's user avatar
0 votes
2 answers
457 views

Pset4: Check50 does not work with my resize program

In my solution biSize and biSizeImage are correct. Checking the headers and the data in the BMP shows correct re-sizing for n = 1, 2, 3, 4, ... Check50 returns: :) resize.c and bmp.h exist :) resize....
Scott McEachron's user avatar
0 votes
1 answer
155 views

Week 5 Walkthroughs

I am trying to get Button.c to work, which is the first of the Walkthroughs from Week 5. I transferred the spl folder to my current directory, altered the Makefile from Breakout so it is working on ...
Brendan Rafferty's user avatar
0 votes
1 answer
65 views

valgrind free and leaks

In the continued lecture of week 5, it is stated that if we don't free memory in our programs, this can lead to a memory leak. But, just to be clear, when my program exit, all the memory used by my ...
alciregi's user avatar
  • 157
0 votes
1 answer
62 views

Pset5 is missing from the web site

I just watched the Week 5 lecture and now I notice there is no pset5 accessible on the web site. Do I miss something here? I also notice that there is no Week 6 on the web site.
Gerald Fuchs's user avatar
0 votes
0 answers
1k views

How do I link the Stanford Portable Library (SPL) to a program?

I was on the walkthroughs of week 5 and I wanted to do the programs mentioned for practice with GButton, GCheckbox and so on. On the header files there is the #include gevents.h gobjects.h and so on, ...
user1646's user avatar