New answers tagged c
0
votes
Convert comma to point in a Float (C)
This is all about that comma. You're trying to get a decimal number from the user. That means that you have to enter a period, not a comma. The C language recognizes a sequence of digits with a single ...
0
votes
Lab 5 - Inheritance check50 error
Your free_family function doesnt actually free anything, it just recursively calls itself in a manner it should... until it gets to a leaf node and calls itself infinitely. I think instead of ...
0
votes
can anyone help error check my luhns algorithm code?
your first loop won't execute because i = 1 and count = 0, 1 is not less than or equal to 0 so it skips the loop. You need to fix this. even if you change the value of count initially, your value of ...
0
votes
p is assigned a memory first but when create family is called again, isnt the last memory lost as now p points at a new chunk of memory?
No because you arent calling create family against p you are calling it to assign to parent0 and parent1 then you are assigning those pointers into the parents array of p.
presumably create_family is ...
0
votes
can anyone help error check my luhns algorithm code?
sum is always 0. How many times does this loop for (int i = 1; i <= count; i++) execute when count is 0?
0
votes
Incorrect blur for filtermore
Cast the result of your addition to a double, make denom a double instead of a float. You want to make sure the division operation is floating point and not integer division and then perform the round....
1
vote
Accepted
PSET2 Caesar help - Rotate function
This is one of those common cases where the compiler is reporting what it thinks is wrong, but not really what is causing the problem. Let's look at the line in question:
if (isalpha(text[i])) &&...
0
votes
Accepted
HELP! Speller segfault
Interesting problem. ;-)
I'll point you in the right direction with a couple of questions.
Which line is triggering the seg fault?
What word is being processed when it seg faults?
What is the value ...
1
vote
filter-less blur function
i would suggest you trimming your demonstration output down to a single color and making a minimal example of the output we dont need to know every case where you failed.. just a short simple one that ...
Top 50 recent answers are included
Related Tags
c × 672cs50x × 186
pset4 × 79
speller × 65
pset1 × 63
recover × 58
pset2 × 50
pset5 × 46
pset3 × 40
resize × 25
mario × 24
check50 × 23
vigenere × 23
cs50-ide × 19
credit × 19
array × 19
pointers × 18
string × 17
segmentation-fault × 15
error × 15
cs50x2019 × 15
caesar × 13
function × 13
pset6 × 11
valgrind × 11