All Questions

Filter by
Sorted by
Tagged with
0
votes
2answers
528 views

Pset6 problem in indexes and load function

Check 50 returns a lot of errors https://sandbox.cs50.net/checks/caefd03d8ac2485b820743724297b846 Edit: New check50 https://sandbox.cs50.net/checks/fa32659c01b742b78c18f1568d48b90d My load function ...
3
votes
2answers
26k views

How to solve “control may reach end of non void function” error

When I try to compile my code, I get an error message that says "control may reach end of non void function." What does this message mean and how can I avoid this error? Here is the function that's ...
5
votes
0answers
214 views

Do YOU know how to find a seg fault?? Advice to new programmers

I have noticed a rash of questions lately that are essentially this: "My code has a segmentation fault. The code compiles, many tests pass, but I can't figure out the problem!" If this is you, then ...
1
vote
2answers
3k views

Pset3 Binary Search problems

I have tested the code presented in the picture and find this function always returns false no matter what number you search.There must be a problem in it but I can not see it!! Can anyone help me ? ...
1
vote
1answer
3k views

How to Fix “control may reach end of non-void function” and “No such file or directory” Errors?

When I compile find, I get this error message error: control may reach end of non-void function When I then try to run the program ./find 14 I get this error message bash: ./find: No such file ...
6
votes
3answers
2k views

Pset7 - Forbidden 403. I can't even get started

I have done a ton of research online regarding this problem and have found several similar threads, but none of those solutions are working for me. I saw somebody posted the same question yesterday ...
0
votes
1answer
932 views

Debugging Webserver in C

I have an error in my server.c file for PSET6 but have no idea how to find it. I am trying to use GDB and it does not seem to be very useful. I would love some help learning how to better debug this ...
2
votes
1answer
430 views

Can psets be graded a second time in edX?

I'm taking CS50 through edX. Is it possible to have a pset regraded after it was graded once?
0
votes
2answers
13k views

How to Wrap Around Array Indexes?

I have the Vigenere encryption portion working properly, but can't seem to figure out how to wrap around argv[1] indexes. My first for loop declared two ints, i and j, and incremented each int with ...
5
votes
1answer
1k views

How long to wait for being graded

How much time does it take to get our psets checked? It's been more than two weeks since I submitted my pset1, yet it hasn't been graded. (I am doing CS50x)
3
votes
4answers
2k views

Not able to access (403 Forbidden) own website: https://ide50-username.cs50.io/ (with my username)

Even the (i) at the top right corner of IDE has disappeared along with the link to the server(or website). I started apache as specified in pset8 with correct permissions etc but am getting 403 ...
1
vote
5answers
8k 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 ...
5
votes
3answers
6k views

How to handle the lack of argv[1] in caesar?

I think my program handles lack of argv[1] correctly, yet it fails check50's test. here my code: if ( argc != 2 ) printf ("usage : ./caesar + key \n"); return 1;
5
votes
6answers
8k views

How to Install the Tools for the Course on Ubuntu

As per the question I have had nothing but trouble trying to use the virtual versions of the cs50 software, namely the virtual machine crashes runs slowly or just generally feels like my fingernails ...
2
votes
3answers
2k views

hacker1 - credit - Problems on some card numbers

The logic from hacker1: Multiply every other digit by 2, starting with the number's second-to-last digit, and then add those products' digits together. Add the sum to the sum of the digits ...
10
votes
1answer
15k views

How to Use check50?

Here are some of the most frequently asked questions about check50. What is check50? What is an ID? How to run check50? How to know if my program is correct? Does check50 record my scores in CS50's ...
9
votes
3answers
889 views

pset4 speller - can't pass valgrind test - 32 bytes still reachable

Can't pass valgrind test on pset4 speller (hashtable). The speller works perfectly but, I'm getting this message from valgrind: ==3911== ==3911== HEAP SUMMARY: ==3911== in use at exit: 32 bytes ...
13
votes
6answers
5k views

Missing network adapter

I'm using Cs50 appliance 2014. I get missing network adapter message in bottom right side. "ifconfig" gives the following output. "sudo service network restart" gives the following output ) I have ...
3
votes
2answers
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 ...
4
votes
2answers
9k views

How are the problem sets graded?

My assignments were correctly executed as per almost all conditions of the automatic evaluation but in the CS50 Gradebook, my grades are 1, 0, 0.21, 1 & 0.33 for problem sets 0, 1, 2, 4 & 5. ...
6
votes
8answers
8k views

Undefined reference to `GetString'

I'm having the following error myName.c:(.text+0x18): undefined reference to `GetString' It seems that something is wrong with the cs50 library. What is this file suppose to contain? In my case it ...
6
votes
2answers
963 views

Is Pset8 optional?

It is mentioned "if unable to get the Google Earth Plug-in working on your computer, you may skip this problem set." Does this means pset8 is optional??
0
votes
1answer
250 views

pset1 - “greedy” failing at one value

So, I just finished typing my "greedy" code for the fifth time and thought that this time it actually works, but when I run the check it fails at only one value 4.2. I'm going to post my code and hope ...
4
votes
6answers
11k views

No Rule to Make Target

I have created very first C program hello world. Its exact copy of the program from 1 week, lecture continued. When I try to make hello in terminal, I got this error message: make: *** No rule to ...
2
votes
1answer
401 views

IndexError in initial state of pset6 Sentiments

I am working on Pset 6, Sentiments and followed the steps to create my app on twitter. I added keys, installed requirements.txt and did everything in order, but when I type "flask run" and visit the ...
1
vote
1answer
470 views

phpMyAdmin: “mysql extension missing” error

pset7: I receive the following error when trying to open phpMyAdmin: "the mysqli extension is missing. Please check your PHP configuration. See our documentation for more information." I previously ...
26
votes
1answer
7k views

Greedy.c works for all numbers except 4.2

When testing greedy.c, all numbers appeared to work except 4.2 (annoying since 4.2 is in the check50 test). I get 22 coins instead of 18. I printed my variables at each stage of the problem and ...
12
votes
2answers
905 views

What does the linker do?

If pre-processor copies the code from library to my source code, and then compiles the combined code, that should mean, that with my code, the library is also compiled, and linked. What does the ...
2
votes
2answers
300 views

Pointer Concepts

I am problem set 6 and very confused by the use of pointers. Please tell me the difference of these things first? What is the difference between char word[length] and char *word = malloc(sizeof(char) ...
1
vote
1answer
1k views

What is the difference in behavior between fread and feof?

For pset4's recover.c code, I noticed the following: when I set my while loop to be while (!feof(inptr)), all the images get recovered, including the last, but check50 throws an error (TODO) when ...
3
votes
1answer
140 views

My output for greedy.c is correct when I check it manually but not when I check it using check50

It says that ' input of 4.2 yields output of 18 \ expected output, but not "18" '. What is the difference between 18 and "18" ?! Here is my code: #include <stdio.h> #include <cs50.h> ...
2
votes
1answer
423 views

Gedit is not working on CS50 Appliance

I've installed the CS50 Appliance, but when I click the gedit button nothing happens. I tried to update the package, but when I enter to Browse Network in the File Manager, I have this error : Failed ...
1
vote
1answer
327 views

pset5:(speller) Check function does not correctly identify misspelled words

/** * Implements a dictionary's functionality. */ #include <stdbool.h> #include "dictionary.h" #include<string.h> #include <stdio.h> #include <stdlib.h> #include<ctype.h&...
1
vote
2answers
1k views

Help with .php files in Pset6 -> Load

Me again, still in pset6, right now working on "load", I did this so far: bool load(FILE* file, BYTE** content, size_t* length) { fseek(file, 0, SEEK_END); long size = ftell(file); fseek(...
1
vote
1answer
960 views

What do I get compilation errors when compiling bounce.c?

I copied the source code for bounce.c and tried to compile it, but I got these errors. This also happens for other programs that use the SPL. jharvard@appliance (~/new): make bounce clang -ggdb3 -...
0
votes
1answer
112 views

pset3 breakout window compilation shows a fatal error

I'm struggling at the starting point of breakout in pset3. I've downloaded the breakout set using wget http://cdn.c50.net/2014/fall/lectures/4/m/scr4m.zip according to the CS50 2015 instruction. It ...
0
votes
1answer
522 views

greedy.c program compiler errors

I am a novice regarding compilers. Can somebody explain to me what the following printed errors mean? Since I was not sure whether I will be violating the Honor Code, I have not included my greedy.c ...
0
votes
1answer
179 views

pset 6 server - Load produces inconsistent results

I'm really confused about what is wrong with my code as load works for certain files but not others and the reading of the file isn't something that is altered in any of the functions we're tasked ...
0
votes
2answers
409 views

Developing JPEGS for pset4's recover troubleshooting

I am currently working on cs50's pset4 recover. I have managed to compile the program. However, when run, the images are corrupt and apparently, according to image viewer, are not jpeg files, because ...
0
votes
1answer
597 views

Segmentation fault - load() function

This is my code for load() function. When I am doing "./speller text" it is showing Segmentation fault. Please help. typedef struct node { char name[LENGTH+1]; struct node* next; }node; node*...
0
votes
1answer
281 views

PSET6 - Server.c why is this load function not working for PHP files?

My server.c works perfectly except for .php files. It displays the PHP correctly but is infinitely loading. The code for my load function is: bool load(FILE* file, BYTE** content, size_t* length) ...
0
votes
1answer
801 views

Game of Fifteen - Move function issue

I'm a beginner so please bear with me. For the game of fifteen I have successfully implemented the Draw function but I'm not having the same luck with Move. It is very erratic, sometimes the tiles ...
0
votes
1answer
323 views

Check50. I need help with server.c, specifically with the parse function I guess. Thanks

I have just finished the 4 functions from Pset 6 (server.c). Well, everything works "fine". If I request /cat.html it returns HTTP/1.1 200 OK and if request cat.exe it returns the most famous server ...
0
votes
2answers
1k views

any idea how to fix Mario more comfortable problem “expected output”

when I executed i have this error :) mario.c exists :) mario.c compiles :) rejects a height of -1 :) handles a height of 0 correctly :) handles a height of 1 correctly *:( handles a height of 2 ...
2
votes
2answers
1k views

pset5 copy.c confused in fread

in copy.c i am seeing some weird code in the part of iterating the scanline and pixels. Since we are passing "inptr" to the (fread) and telling it to work just once. How does the code makes sure that ...
6
votes
2answers
2k views

How to Compile the CS50 Library on Another Linux Distro?

I have copied cs50.c and cs50.h from the appliance. Now, what's the command that should be run to compile this library using gcc or clang on any other Linux distro (e.g., Ubuntu 14.04 in my case)?
2
votes
1answer
4k views

Pset4 resize.c - bfsize & bisizeimage formulas

First of all thanks for your time. Taking cs50 through edX - struggling as all alone here and videos / lectures are burnt out for information - need real people! Online cs50 really does assume a lot ...
1
vote
1answer
360 views

my server pset throws up “505 HTTP Version Not Supported” but i think it should not

Am done with pset6 but want to test if I implemented the server correctly but when I type in the URL (e.g: 192.#.#.#:port#/cat.jpg) into the browser as specified by David, I get the following error "...
12
votes
1answer
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.............................................
4
votes
4answers
1k views

Running breakout on Mac OS X

There's a similar question about running breakout on Linux variants: Can't run Breakout outside of appliance My question is specifically about compiling breakout (and hence SPL) on Mac OS X. So ...

15 30 50 per page
1
2 3 4 5
12