Skip to main content
Search type Search syntax
Tags [tag]
Exact "words here"
Author user:1234
user:me (yours)
Score score:3 (3+)
score:0 (none)
Answers answers:3 (3+)
answers:0 (none)
isaccepted:yes
hasaccepted:no
inquestion:1234
Views views:250
Code code:"if (foo != bar)"
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Saves in:saves
Status closed:yes
duplicate:no
migrated:no
wiki:no
Types is:question
is:answer
Exclude -[tag]
-apples
For more details on advanced search visit our help page
Results tagged with
Search options answers only not deleted user 10074
1 vote

error: implicit declaration of function

What version of the CS50 IDE? You can see it in the top right next to the cloud9 icon, or run version50. Current version is 94 (as of this writing). get_string() was introduced recently, for the CS50x …
DinoCoderSaurus's user avatar
0 votes

Is it possible to create/declare an alphanumeric variable inside a 'for' loop in C?

This is a great course, and if you are interested in learning C, I strongly recommend it. You can sign up here at edx.org. There is an option to audit the course. … C is a strongly typed language, and as such it is not possible to create variable names dynamically. …
DinoCoderSaurus's user avatar
2 votes

switch case inside do while loop - not looping

When the user chooses an option (w), they have type two characters: the option and enter. You need to "consume" the enter from stdin lest it be assigned to q. Reference this SO post or this one.
DinoCoderSaurus's user avatar
1 vote
Accepted

getchar doesnt work as expected

One issue is here: // stop on newline if (chr == '\n') break; When the input is "enter", the for loop "breaks", and is done. The dilemma: how to enter a list of numbers, when y …
DinoCoderSaurus's user avatar
2 votes

Why does this error keeps popping in my caesar code?

This int printf(const char *format, ...); is the function signature of printf. The ... represents the data arguments used by the format. Since argv[1] is the argument for %s in the format, it needs t …
DinoCoderSaurus's user avatar
0 votes

Why am I getting an “invalid slug” message when running check50

The "slug" refers to the command line argument supplied to cs50, not to anything in the code. The command from the spec is check50 cs50/problems/2020/x/readability Verify it is typed correctly (or …
DinoCoderSaurus's user avatar
1 vote
Accepted

sys/resource.h in speller.c Where is it and how can I open it?

This answer: If you have locate command available you can simply use locate: -bash-3.2$ locate sys/types.h /usr/include/sys/types.h /usr/lib/syslinux/com32/include/sys/types.h -bash-3.2 …
DinoCoderSaurus's user avatar
0 votes

Recover: While loop repeats but does'nt add variable

Welcome to the wonderful, wacky, wtf world of memory leak! This allocation char title[7]; is causing the problem. This sprintf(title, "00%i.jpg", jpgCount); is stomping on jpgCount's memory. How so? L …
DinoCoderSaurus's user avatar
1 vote
Accepted

pset 3 game of fifteen check50 problem

At least two things going on here. First, unless I've misread something, this else if (board[i+1][j] == -1) will never be true (nor any of the else that compare a board location to -1). All of the i …
DinoCoderSaurus's user avatar
1 vote
Accepted

CS50 fifteen - expected file to be of length 18, not 27

You have changed the board logging routine and that is what check50 is complaining about. check50 depends on that output (log.txt) to verify the result. Here is the routine from the distribution code: …
DinoCoderSaurus's user avatar
1 vote
Accepted

pset2 Initials not being accepted by check50

If you are doing "more" version, you'll likely run into trouble here printf("%c", toupper(name[i])); (the first one). When it executes that line, i = 0. If name[i] is space, it will print space. …
DinoCoderSaurus's user avatar
1 vote
Accepted

C: Vigenere code "rejects "Hax0r2" as keyword"

This !isalpha(argv[1][0]) is only testing the first character of argv[1]. Your statement "The check50 checks expect the key to be iterated through then immediately rejected" is quite true. The program …
DinoCoderSaurus's user avatar
2 votes
Accepted

Pset5 - Some misspelled words not identified

int is matching on in. org is matching on or. Why? Because it is checking is_word on the second-to-last letter. When check process the t in int, it will not move crawler because of if(word[i+1] != '\0 …
DinoCoderSaurus's user avatar
3 votes
Accepted

cs50 pset1 mario math wrong or order?

There's a couple of problems. First, height is essentially a constant after it is entered by the user. It represents the number of rows to print, and as such, shouldn't be changed by the program. It …
DinoCoderSaurus's user avatar
1 vote
Accepted

check function in speller pset5, not quite understanding the apostrophe

If you look into the large dictionary, you will discover "i" is the first i entry and "ca" is the first c entry. cursor->word is always the first entry. What happens with "is"? …
DinoCoderSaurus's user avatar

1
2 3 4 5
15 30 50 per page