9
votes
Can't submit or check
Had similar problem with similar message. This is how we found out what was wrong:
Executed check50 -h to see what logging options there were. Discovered we can turn on debug logging using --log-...
8
votes
Undefined reference to `GetString'
Download the cs50 from: http://mirror.cs50.net/library50/c/library50-c-5.zip
Extract it. (You will get two files cs50.c and cs50.h)
Now copy both the files to your default library folder. (which ...
6
votes
Accepted
implicit declaration of function is invalid in C99
Sorry, beginner error:
But now if we try to print_name(s) in our main function, we still get
an error. And that’s because the compiler reads from top to bottom, in
order, so at the time main ...
4
votes
Accepted
vigenere sometimes prints extra characters at the end of ciphertext in an unpredictable pattern
The problem comes because cipher is declared a char array here char cipher[strlen(plain)];, but printed out using a string (aka char*) format here printf("ciphertext: %s\n", cipher);.
Remember, the ...
3
votes
phpMyAdmin: "mysql extension missing" error
We all know that phpMyAdmin can be flaky sometimes. Unfortunately, I can't tell you how to fix it -- but I can tell you how to use mysql50 shell from the command line. Try stuff like this:
mysql50 ...
3
votes
Accepted
cs50.h - no such file or directory
Your code may be the same as David's but your environment is (drastically) different. You will possibly (probably?) have to make adjustments to all the courseware as you go along. In the IDE50 ...
3
votes
A wierd error in won function (fifteen)
the hint is in
1-2-3|4-5-6|0-7-8
ie
1 2 3
4 5 6
0 7 8
Your won function will say that's a winning position, which it isn't.
That same sort of scenario doesn't occur during the 4x4 gameplay.
To ...
3
votes
did not find EOF Pset 1 mario. expected "##\n", not " ##\n"
In case of a height of zero (which is a valid height), your programme should print zero lines and exit. You probably reject zero as a height and ask again, the tester doesn't expect being prompted for ...
3
votes
Accepted
UndefinedBehaviorSanitizer:DEADLYSIGNAL, what does that mean?
It's a segmemtation fault.
If this answers your question, please click on the check mark to accept. Let's keep up on forum maintenance. ;-)
3
votes
Accepted
Pset3 - runoff - print_winner and find_min error
You return prematurely. Simply finding a vote count smaller than the max is not enough. You need to keep going until you've looked at all the candidates, and then return the smallest vote count.
// ...
2
votes
Accepted
caesar--how do i make k an int? error "invalid operands to binary expression ('string' (aka 'char *' and 'int') in cipher section of code?
Hard to tell what you did without seeing the code, including the declaration for k and what you mean by "converted to an int". If you cast it as an int as in this, x = (int) k;, well, that only casts ...
2
votes
Accepted
Why does "if (input[i] == " ")" throw an error of "incompatible integer to pointer conversion"?
It turns out that using double quotes vs single quotes makes a difference in C!
Double quotes are used to wrap a STRING, while single quotes are used to wrap a CHARACTER. This is easy to remember if ...
2
votes
Debugging Webserver in C
GDB should be a very useful tool for debugging server. The waiting is the hardest part. Remember server will be waiting for input from a browser/curl to process something or waiting for gdb to ...
2
votes
Accepted
check50 error in vigenere with baz and Hax0r2 argv
check50 has no bugs.
Your sandbox results show only one error 'szz' rather than 'rby' inside this string
Expecting the following on standard out — xoqmd, rby gflkp!\n ... but received the ...
2
votes
Accepted
pset7 session_start() error
Did you bounce apache50 after update50? (apache50 stop, apache50 start "your-root"). Try that. When you unzipped the files did it give a "replace" prompt? If so, which option did you choose? You can ...
2
votes
Too much whitespace in vigenere.c, style50 error in pset2
Change (int) alphabet to ((int) alphabet).
The parentheses won't change the meaning (as typecast has higher precedence than binary minus operator), but they silence style50 (and are my preferred ...
2
votes
Accepted
Too much whitespace in vigenere.c, style50 error in pset2
Consider removing the typecasting, because it is essentially redundant. A char is a one-byte integer; the system does it's own internal "casting". Perhaps rewatch the caesar walkthrough. Starting ...
2
votes
Accepted
time for change
You're using cent_amount again and again, without updating. I think you meant to use something else instead at those places I've marked below:
quarter_amount= cent_amount / QUARTER;
...
2
votes
pset 1: credit.c -- Completed with right output but check error?
The gradebook will give the same result as check50, so if you submit that you will get a deduction. Are you missing the '\n' after INVALID by any chance?
2
votes
Accepted
How to fix Error: unused variable (Pset 1 - Greedy)
This is a visibility problem, amount only exists inside the loop, the solution is to declare amount hole of the loop:
float amount;
And then inside the loop:
amount = get_float;
2
votes
Accepted
What 's the error in my code, it's not working on cs50 ide
You cannot use = {..} for assigning an array, it's only for initialization. If you want to initialize the array with values, do like:
char a[4][4] = {
{65, 0, 65, 0},
{65, 0, 65, 0},
{...
2
votes
Accepted
Code Seems to Work but check50 says otherwise (pset2)
Double check your loop condition. Your output is showing that you are printing the null char that signifies the end of the string.
Be sure that if you have a string "ab" (which, in memory is 'a', '...
2
votes
How can I fix the “expected to find "112.00" in page, but it wasn't found” error?
The problem might be that your page rounds it to 112, or 112.0, while check50 wants it displayed as 112.00.
You might want to that like this:
roundedvalue = "{0:.2f}".format(oldvalue)
Please accept ...
2
votes
error at while loop cs50 Pset1 credit
The compiler is actually giving a warning, but the compiler flags are set up to treat all warnings as errors. It's still best to eliminate all warnings.
Here's the reason. For clarity, let's ...
2
votes
Accepted
Pset6 credit python Problem
The function get_int returns an integer and therefore if you wish to access each character by its corresponding index consider first casting it to a string.
2
votes
Accepted
pset5 speller case-insensitive
When you calculate the hash of the word being checked, have you converted the word to all lower case or are you hashing a word with upper case letters? The latter will generate a different hash ...
2
votes
During PSET 2: Substitution, I got an expected expression error for get_string. Please help
Your get_string() has no arguments, while in the lectures we've been taught to always insert a prompt (in the form of a string) in between the parentheses.
Try combining these two lines:
printf("...
2
votes
Accepted
Error: use of undeclared identifier 'j'
You did use an undeclared identifier j in the second for loop. It isn't created until and only inside the following 3rd for loop.
The compiler never lies. It might mislead on occasion, but it never ...
2
votes
Accepted
Problem Set 1 help, clang hello.c, and ls (list)
Ahh I figured it out!
Instead of using ~/pset1/hello/ $
go back to just the directory pset by using change directory
~/pset1/hello/ $ cd ~/pset1/
then add your ls command
~/pset1/ $ ls
hello/ ...
2
votes
Accepted
HELP, keep getting this error.... error: invalid operands to binary expression ('float' and 'int')
It's a simple problem and the same issue in all cases.
The code is trying to do dollar % 25 BUT, dollar is a float, not an int. The modulo operator requires both operands to be integers. Modulo ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
error × 274pset1 × 38
check50 × 27
pset2 × 25
pset3 × 24
pset6 × 23
pset5 × 19
cs50x × 17
c × 15
mario × 14
pset7 × 13
server × 12
pset4 × 11
speller × 10
code × 10
recover × 9
finance × 9
valgrind × 8
readability × 8
caesar × 7
cs50-ide × 7
parse × 7
function × 7
problem × 7
vigenere × 6