Questions tagged [walkthroughs]

The tag has no usage guidance.

1
vote
1answer
830 views

Credit from CS50 2018 week 1 walkthrough

Hi i am a beginner and i have been trying to solve this set but with no avail. I tried to use what was taught in the first lesson and did search for some help online when i encounter errors. However, ...
0
votes
1answer
120 views

pset6 (similarities, more, distance - walkthrough) : what's happening at 7:43 in the video?

To transform string 'ca' to 'a', I don't understand why the answer is '1, S' (1, substitution) instead of '1, D' (1, deletion). Since 'a' == 'a', then shouldn't we use the diagonal cell, which is '1, ...
0
votes
1answer
90 views

pset6 walkthrough cost matrix

In the second walkthrough video Brian uses two example words, "cat" and "ate" to demonstrate cost indexing of a tuple that lists the number of conversion steps and the last type of conversion made. ...
1
vote
2answers
61 views

Multithreading vs. Multiprogramming

I just went through the "Walkthrough" videos in Week 0 material, particularly the one about threads. Prof. Malan says that by helping to run two or more scripts simultaneously, Scratch supports "...
1
vote
1answer
19 views

Walkthrough 'text' why is pressing enter needed

Why in the walkthrough titled 'text', does the text in the text field only get transmitted to the Gedit window when Enter is pressed. At which point in the code does it state 'When Enter is pressed ...
0
votes
2answers
70 views

Week 1 - Conditions - error expression result unused (expect ; at end of if else)

Error: expected expression (see photo) It's a very basic program and I'm sure I've made a simple syntax error. There shouldn't be a ";" at the end of the else line and I have included the ; at the ...
0
votes
1answer
51 views

For week 4 walkthrough unused variable even though I typed the same code as David

I type the same code as David, yet I get an unused window error and he doesn't. My code follows, and you can just as easily compare with his. #include <spl/gevents.h> #include <spl/gwindow....
0
votes
1answer
699 views

Should I Watch the Sections and Walkthroughs?

I am starting CS50x and am wondering whether I should watch the Sections and Walkthroughs. Thanks!
0
votes
1answer
24 views

F2C Walkthrough Week1, What is wrong with my code?

clang is telling me that there is something wrong with my use of GetFloat(). Does Anything pop out at you? Will you help me figure out what is wrong? #include <cs50.h> #include <stdio.h> ...
2
votes
0answers
56 views

Why am I getting linking errors when trying to make a program that uses the SPL? [duplicate]

Why is it, whenever he uses "make" to generate the program, it works flawlessly; but when I do the same, I always receive linking errors? make text clang -ggdb3 -O0 -std=c99 -Wall -Werror text.c -...
0
votes
1answer
21 views

How to run button.c and other programms?

The program has already added this line: clang -ggdb3 -o0 -std=c99 -Wall -Werrior -o -button -button.c -lcs -lm But when I used the make button It shows 'bounce' is up to date. How can I run the ...
1
vote
0answers
152 views

week4 some compiling error

jharvard@appliance (~/Dropbox/pset3): make ./bounce clang -ggdb3 -O0 -std=c99 -Wall -Werror bounce.c -lcs50 -l`enter preformatted text here`m -o bounce /usr/bin/ld: /usr/lib/debug/usr/lib/i386-...
0
votes
0answers
251 views

week 4 | walkthroughs | button | compiler error “use of undeclared identifier 'GButton'”

make button » error: use of undeclared identifier 'GButton' jharvard@appliance (~/Dropbox/pset3): make button clang -ggdb3 -O0 -std=c99 -Wall -Werror button.c -lcs50 -lm -o button button.c:12:5: ...
1
vote
4answers
418 views

week 4 | walkthroughs | bounce | compiler error

jharvard@appliance (~/Dropbox/pset3): make ./bounce clang -ggdb3 -O0 -std=c99 -Wall -Werror bounce.c -lcs50 -lm -o bounce /usr/bin/ld: /usr/lib/debug/usr/lib/i386-linux-gnu/crt1.o(.debug_info): ...
0
votes
1answer
40 views

week 2 - walkthroughs - ages.c: average

How does this calculation make sense? #include <cs50.h> #include <stdio.h> int main(void) { int n; do { n = GetInt(); } while (n < 1); int ages[n]; for (int i = 0; i < n; i++...
0
votes
1answer
49 views

week 4 walkthrough swap

void swap (int *a, int *b) { int tmp = *a; *a = *b; *b = tmp; } I want to know if int tmp = *a, "*a" means an int value, then *a = *b, both *a and *b become pointers, ...
0
votes
1answer
42 views

Trying to compile f2c.c from walkthrough week1 without success [duplicate]

I'm trying to compile the programming from the walkthrough week1 f2c but it doesn't work. I don't know what I'm doing wrong. When I type in "make f2c" it returns *** No rule to make target `f2c'. ...
0
votes
1answer
182 views

Greedy and Zamyla's pseudo-code

In the Walkthrough for Greedy.c, Zamyla asked if you can spot her error: > get amount in dollars > while (quarters can be used) increase count amount decrease by a quarter ...
1
vote
1answer
208 views

Subtitle files for problem set 0 videos

Where can I find the SRT files that go with the videos in the problem set 0 specifications?
0
votes
0answers
75 views

Walkthrough cat/bird in Scratch

I duplicated the walkthrough where the cat chases the bird, but it does something completely different. The cat never catches the bird and keeps a set distance. Whenever the cat goes near, it suddenly ...
4
votes
3answers
671 views

What does if (s != NULL) do?

According to the lecture in Week 2 and the walkthrough video "String", to make sure that the user gives us a valid string we use this condition: if (s != NULL) { //code } ...
0
votes
1answer
66 views

“No playable video sources found” when trying to watch cough-1

I want to watch the cough-1 video walkthrough from Week 0, but I got the message, "No playable video sources found." How can I watch the video?
2
votes
1answer
122 views

Should We Free Memory Allocated By GetString()?

Running valgrind with line 42 commented out shows that there are indeed some leaks. If we DON'T comment out line 42, then there are no leaks. Here is the code // copy-1.mp4 from Week4 Walkthroughs //...
2
votes
2answers
47 views

In “cough-4,” is it better to define 3 functions or 1 function?

In the week 0 walkthrough "cough-4," Prof. Malan defined 3 functions. Instead we can define 1 - say word n times and when flag is clicked, say "cough" 3 times and then say "sneeze" 3 times! Is this ...