Recently Active Questions
13,589 questions
0
votes
1
answer
90
views
Clang external library (libcs50) linker error "C"
I don't access to 4g internet connection, so I installed cs50 library on my lubuntu for offline use, I put the cs50.h file in /usr/local/inlcude and the libcs50.a file in /usr/local/lib. Now when i ...
0
votes
1
answer
138
views
Pset6 Cs50 = Readability false output
I have been trying to complete readability python but on every result it is showing before Grade one
from cs50 import get_string
s = get_string("Text: ").strip()
num_letters, num_sentences,...
0
votes
2
answers
31
views
freeing temporary node in functions
how to free the temporary pointer, one creates during the check function?
valgrind shows error on that particular statement
tried freeing it only when it has reached null, i.e., transverse over all ...
0
votes
1
answer
45
views
An error with my code?
So recently I made a code for the CASH project in CS50, but for some reason its giving me wrong values for the total amount of coins when I think the code is correct. I posted my code down below, ...
1
vote
1
answer
405
views
pset 4 filter edge not working
I am having issues with my implementation of edges. I decided to make a 'border' around the edges of the image made up of zeros (did this in a copyImage array). I get correct outputs for some of the ...
0
votes
1
answer
54
views
workspace not working properly
Since yesterday, there have been issues with my workspace, slow and arrays weren't properly assigned. I couldn't update the workspace, since yesterday it says:
W: Failed to fetch http://linux....
0
votes
1
answer
73
views
Segmentation fault in pset5/speller while linking newNode with the linked list
I have been trying to resolve errors in my speller "load function". I have been able to resolve a couple of them except this one. Debug50 reveals that while creating a link between new Node and the ...
0
votes
1
answer
82
views
Can anyone explain this chart from the "dynamic programming" lecture in a different way?
I'm having trouble understanding how this table is constructed. A little before this point in the lecture, we get to take a look at this table.
However, he explains the table by basically trying to ...
0
votes
1
answer
105
views
Still having problems with recover.c, doesn't pass all the checks
Here is my code:
include
include
include
include
int main(int argc, string argv[])
{
// ensure proper usage
if (argc != 2)
{
fprintf(stderr, "Usage: ./recover infile\n");
...
0
votes
1
answer
43
views
int main(void) won't work
$ mkdir hello
$ cd hello
hello/ $ code hello.c
hello/ $ #include <stdio.h>
hello/ $ int main(void)
bash: syntax error near unexpected token `('
Can you help me solve this?
0
votes
1
answer
43
views
pset 1 greedy- my code is getting stuck in do while loop. Why is it not take values like $.46?
I am working on pset1 greedy and my code is not working properly. if I put in the value .30 for float than it goes further. However, if I input .46 or 1.26 then it's getting stuck. Can you help with ...
0
votes
1
answer
45
views
pset4 Recover "grade"
I recently submitted my Pset4 Recover project to the new grading Bot....and received 0 of 100.....despite the fact that my program returns all 50 photos....reaches the EOF .....Valgrind shows 0 ...
0
votes
1
answer
80
views
cs50 pset3 runoff tabulate - why you say candidates[i].votes = 0 ; here?
why use that ??
for (int i = 0; i < candidate_count; i++)
{
candidates[i].votes = 0;
}
}
return 0;
0
votes
1
answer
39
views
Haystack not found
Hi can someone help me out the code "./generate 1000 50 | ./find 127" doesn't find the haystack. And I even removed the "./find 127" and went through the generated numbers but still didn't see the ...
0
votes
1
answer
50
views
PSET4 Recover Segmentation Fault, please help
I hope everyone is doing well during this difficult time, my prayers to those been affected by it.
I have difficulty debugging the segmentation fault here and the cs50 debugger is not too helpful on ...