Newest Questions
13,589 questions
1
vote
5
answers
9k
views
What's wrong with my code for mario?
I've been stuck on pset1 for five months now. I like to do things chronologically and mario has been giving me headaches.
Every time I think I have the problem solved, I'm told it's wrong or a lot is ...
0
votes
3
answers
691
views
Mario Pyramid - Check50 - Unexpected end of input
Does anyone know what this means? I'm getting the correct output from my program and this is the only message I get from check50.
0
votes
2
answers
647
views
helpers.c: EOF not working
I have made find.c and coded binary search in helpers.c, so when I run find like
./find 42
and start entering sorted values like
haystack[0] = 42
haystack[1] = 43
haystack[2] = 44
haystack[3] = ...
13
votes
1
answer
3k
views
check50 returns unexpected end of input
I recently finished my code for pset5 recover.c. It compiles, and runs successfully and recovers all 50 pictures. But when I try check50, it gives
Checking..............................................
2
votes
3
answers
357
views
pset3 FIND: Strange clang error whenever I compile code
I'm coding binary search in helpers.c currently, but I receive a strange clang error every time I try to compile code. I'm absolutely sure my code is logically and syntaxily correct. Where am I going ...
2
votes
2
answers
423
views
Mac setup for the CS50 Appliance
I'm currently following the CS50 course online and I have installed the appliance.
I have managed to change the keyboard to azerty (which I use) and changed the layout to Belgian (you'll never guess ...
1
vote
2
answers
2k
views
GetString() giving me a segfault in C
I am running a program in C using a GetString function (not from the CS50 library). When I run the program I get a segmentation fault error. In GDB, when I backtrace it tells me:
Program received ...
0
votes
1
answer
1k
views
How does valgrind work?
Can anyone explain to me how valgrind works exactly?
I mean, how does it know when memory is leaking, allocated and freed?
3
votes
3
answers
716
views
When I try to use phpMyAdmin, I get a forbidden error
I am trying to start pset7 but whenever I try to use phpMyAdmin I get this error:
Forbidden
You don't have permission to access /phpMyAdmin on this server
In my experience, I should get a popup asking ...
4
votes
1
answer
159
views
Drop off house not in HOUSES
I picked up a passenger and the house name for this passenger, "Wigglesworth Hall," doesn't exist in HOUSES, so my call to get the lat and long for that name fails when I loop through the passengers ...
2
votes
3
answers
3k
views
Where can we find Solution Code?
After we have finished the problem sets, is there a place where we can view the cs50 staff solution of a program? Sometimes i feel that there may be a more elegant way to solve a problem, but was ...
4
votes
2
answers
1k
views
Why does check50 fail with status code 400?
For the last month, I've been trying to use check50 to see if I wrote the right code for the problem sets, but no matter which problem, it always fails with status code 400.
Any idea what I should ...
9
votes
2
answers
788
views
What happens under the hood when performing a cast?
In the walkthrough example, ASCII-0.c, a cast has been performed to convert a number (integer in specific) to a character.
I would like to know what exactly happens at the lower level when we cast an ...
9
votes
2
answers
2k
views
How does fread progress through each byte in copy.c?
In copy.c (and the other apps using the same start code), how does freed know to read one byte after another? It seems to just do it automatically.
Eg, this will read each byte, from first until bi....