Questions tagged [help]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
0 answers
27 views

CS50 PSET4 Recover. Files created, images visible, why check50 fail?

Why isn't check50 clearing even though the files are created and the images are visible? #include <stdint.h> #include <stdio.h> #include <stdlib.h> typedef uint8_t BYTE; typedef ...
Don Tan's user avatar
0 votes
1 answer
23 views

CS50 Mario Less - Check50 Error

I recently started taking the CS50 class at Harvard, and I'll admit that I feel like I have hardly a clue at what I'm doing. It was a huge jump from the Week 0 to doing this. I'm halfway there to ...
Newbie_Coding's user avatar
0 votes
0 answers
87 views

I don't understand the answer to the pset3 atoi practice problem

#include <cs50.h> #include <ctype.h> #include <math.h> #include <stdio.h> #include <string.h> int convert(string input); int number = 0; int main(void) { string ...
Harr's user avatar
  • 35
0 votes
1 answer
17 views

Getting " error: declaration shadows a local variable" but i don't know why

int wordsize = atoi(argv[1]); int status[wordsize]; for (int b = 0, wordsize < b; b++) { status[b] = 0; } The error happens specifically at the word "wordsize" in the for loop. I'm ...
Harr's user avatar
  • 35
1 vote
1 answer
360 views

Getting the error: non-void function does not return a value in all control paths [-Werror,-Wreturn-type] and i don't know why

#include <cs50.h> #include <stdio.h> #include <ctype.h> #include <string.h> #include <math.h> bool only_digits(string s); int main(int argc, string argv[]) { if (...
Harr's user avatar
  • 35
0 votes
2 answers
144 views

Getting "using the result of an assignment as a condition without parentheses" error and i don't know why

for (int i = 0; n = strlen(argv[1]); i < n; i++) { if (isdigit(argv[1][i])) { return 0; } else { printf("Usage: ./caesar key\...
Harr's user avatar
  • 35
0 votes
1 answer
28 views

Getting "use of undeclared identifier" and can't solve it without ruining my code

i've been working on the mechanism to get every other number of the credit card number, and this is what i've come up with so far: int get_credit(void); int check_sum(int number, int a); int ...
Harr's user avatar
  • 35
0 votes
1 answer
517 views

I need help to fix my selection sort code - Practice Problems (Average High Temperatures)

I need help fixing my code. I don't know what else to do, I've been trying to sort all the temps array in descending order. But I don't know what I'm doing wrong. Can you help me saying what things I ...
AlvaroAndLukeTheCoder's user avatar
0 votes
1 answer
152 views

PSET2 Substitution

#include <cs50.h> #include <string.h> #include <stdlib.h> #include <ctype.h> #include <stdio.h> int main(int argc, string argv[]) { // Checks if there are two ...
Chi Go's user avatar
  • 3
0 votes
1 answer
10 views

My friend uninstalled few things and now her VSC environment does not work

Comparing with mine, Few of her extensions are missing including CS50, CS50 phpLiteAdmin. All of the ports have not populate in the beginning She has error message when using update50, check50, or ...
Sado Kim's user avatar
2 votes
1 answer
28 views

Just getting started

Before I start the program, I wanted to hear more about the CS50. I haven't tried anything in Comp Sci or Programming before and honestly have no idea what to expect. Can anyone give me a little more ...
Devin Ruy's user avatar
0 votes
1 answer
289 views

PSET 3 runoff is_tie function

New to this platform, forgive me if there are some norm or etiquette I may be missing. Please feel free to provide feedback on anything that is incorrect. This is for the is-tie function alone. I ...
x code's user avatar
  • 23
0 votes
1 answer
371 views

How do I get rid of the "expression result unused" error?

I am trying to get it to where if input "n" and "x" are the same number it will display "years = 0" if not it will run else statement. Instead it was running both the if ...
Selena H.'s user avatar
0 votes
1 answer
451 views

Cs50 IDE text is white no highlighted code Text editor not displaying color coded text Please help

I opened CS50 IDE hoping to work on a problem set and all the code I write is plain white text. No colors or highlighted code. It's just dead plain text.... Any suggestions?
Nicholas Dalman's user avatar
0 votes
1 answer
3k views

Fiftyville - please help!

I am quite sure about my answers... but still, check50 doesn't approve my answers... can you please tell me whether my answers are indeed wrong to start thinking about it again cause in my mind I am ...
Danae Philioti's user avatar
0 votes
1 answer
61 views

make: *** No rule to make target 'population'. Stop. for population work

please help me. I don't understand why this is not working I tried to cd pset1 already but it still didn't work. I have been spending a lot of time to figure it out yet I can't. Please help me I would ...
Thiranida Tangjadetanapon's user avatar
0 votes
2 answers
946 views

My code gives error RuntimeError: no such table: File_Name

This is simplified version of my code from cs50 import SQL open("File_Name", "w").close() db = SQL("sqlite:///File_Name") id = 2 filename="hola" db.execute(&...
Inderveer's user avatar
0 votes
1 answer
334 views

cs50 mario MORE comfortable need LOTS OF HELP

so ive been stuck on this problem for a about a week, took lots of note and downloaded the lecture just look back on even took notes for the shorts on week one. now what i clearly need is to be taught ...
ZeiT's user avatar
  • 3
0 votes
1 answer
196 views

String to Char in C

How can I convert a String to a Char in C? Please help. I am unable to do that and I need it urgently. I need it for readability.
Saara Luthra's user avatar
0 votes
1 answer
303 views

Pset2 Readability error: expected identifier or '('

I've been trying to compile this code but always get this error "error: expected identifier or '(' " for the line 13 (which is the first one starting with "for") COuld someone help ...
Mika-Anne Reha's user avatar
0 votes
1 answer
59 views

pset 4 - recover. Can't figure out what is going wrong!

Can't figure out what I'm doing wrong, I've spent like 2 days on it already, please help! #include <stdio.h> #include <stdlib.h> int main(int argc, char *argv[]) { if (argc != 2) {...
Lakshya Dugar's user avatar
1 vote
1 answer
33 views

pset 4 - recover, can't figure out mistake

I can't figure out what I'm doing wrong, please help! #include <cs50.h> #include <stdio.h> #include <stdlib.h> #define BUFFER_SIZE 512 int main(void) { // open memory ...
Lakshya Dugar's user avatar
0 votes
1 answer
36 views

"cash.c:7:1: error: expected identifier or '('" What do I do?

I've been trying to compile cash.c, but for a reason, it always says I have an error in line 7... could someone help me find the error...? I tried different things to try and make it work but it does'...
Mika-Anne Reha's user avatar
1 vote
1 answer
1k views

PSET 7 Movies SQL Q9

In 9.sql, write a SQL query to list the names of all people who starred in a movie released in 2004, ordered by birth year. ...Your query should output a table with a single column for the name of ...
Kevin Rodriguez's user avatar
0 votes
1 answer
60 views

CS50 Week 4 Recover. Generating 50 Blank images

Here is the code any help is greatly appreciated. Thanks! #include <stdio.h> #include <stdlib.h> #include <cs50.h> #include <stdint.h> #include <stdbool.h> typedef ...
king2lc's user avatar
1 vote
2 answers
124 views

PSET3 Runoff Help Please

for(m = 0; m < voter_count; m++) { for(t = 1; t < 4; t++) { string name = get_string("Rank %i: ", t); } printf("\n"); } } bool vote(int voter, int rank, string name) { ...
iliketurtlz's user avatar
0 votes
2 answers
547 views

how do i write pesudocode.txt for Mario? (less comfortable)

After I input: mkdir ~/pset1/mario its asking me to write pseudocode.txt and i am not sure how i can do that. I've tried inputting the pseudocode.txt and that gives me "command not found"
Iris A San Juan's user avatar
0 votes
2 answers
189 views

are we supposed to use the set from hello.c to begin with Mario (less comfortable) or do we need a new terminal and file?

the first thing that the Mario instructions say is this : First, create a new directory (i.e., folder) called Mario inside of your pset1 directory by executing ~/ $ mkdir ~/pset1/mario. I do not ...
Iris A San Juan's user avatar
1 vote
1 answer
50 views

CS50 recover (fclose giving segmentation fault)

found a few answers to the segmentation fault issue in CS50 recover while closing the file but I couldn't translate the answers to my issue: The last part: fclose(f); fclose(img); is resulting into ...
perkuche's user avatar
1 vote
1 answer
116 views

Cant get past the ls command in hello.c

I cant get past the List command in hello.c, and i'm not sure if i'm supposed to get something in the terminal after i type in ls, so i kept going and typed clang and i get the error message. I've ...
Iris A San Juan's user avatar
0 votes
1 answer
63 views

Stuck badly in Speller - segmentation fault

My first post here. I am fighting the 'speller' exercise for 3-4 weeks already, on and off. I think I've got the core of the code, but I keep running into a segmentation fault. Could someone please ...
Elvinas Didika's user avatar
0 votes
1 answer
63 views

Counter fails to update for DNA

My dna program always returns no match and after debugging it I've pin pointed the problem to the counter not updating correctly. My program finds the correct number of matches, which I've confirmed ...
Mike S's user avatar
  • 1
0 votes
1 answer
268 views

[Week 2 Substitution.Why does my code fail the checks even if the output is correct?

Here is my code. Apologies if it is hard to understand / messy. When I check50 it shows this. I have a brief idea on how to solve the invalid characters in key but I don't mind some help on that too. ...
anahop's user avatar
  • 1
0 votes
2 answers
116 views

Help with pset3 runoff

is this correct for vote function..struggled to figure out how to access candidate index so not sure if this is correct..any help/advice would be greatly appreciated bool vote(int voter, int rank, ...
Ak500's user avatar
  • 1
0 votes
1 answer
147 views

pset1 less comfortable mario

Somebody please help me I have watched the walkthrough thrice, many different videos and searched for answers on reddit and stackexchange yet i've been stuck at this for hours now and cant get through....
ammar79797's user avatar
0 votes
1 answer
796 views

Using submit50 on VSCode

I'm doing CS50 AI and as a result been using submit50 in VSCode via the Windows Subsystem for Linux. Until I updated my IDE to the April update, submit50 used to ask my GitHub username and password in ...
Suhas Thalanki's user avatar
0 votes
1 answer
24 views

Error message help

I am receiving an error that states my first curly brace is bad. I have copied this code from lecture 1 and tried to run it because I keep seeing the same error. I believe that my code is identical ...
Tommillerstudio's user avatar
0 votes
1 answer
223 views

My DNA code works with the small database but not the large one

My code works perfectly fine with the small database but gives "No Match" for the large one and I can't figure out why. Any help would be appreciated! import csv from sys import argv, exit def main()...
Suhas Thalanki's user avatar
0 votes
1 answer
46 views

PSET 2 IDE Compiling Issues

I am now on PSET 2 and moved to the CS50 IDE, however, when trying to set up and test the IDE by writing and compiling a simple piece of code under the title readability, i get the below error. I ...
NicoEF123's user avatar
0 votes
1 answer
73 views

One tiny step to completion. Recover recovers all images except the first one. Help!

Alrighty. I just need someone to point out to me where the issue is so i can finish this thing. submit it. and move on. i'm so so close. so help would be greatly appreciated. // include libraries #...
Ash's user avatar
  • 35
0 votes
0 answers
43 views

Help on Pset5 Speller

bool load(const char *dictionary) { // Open dictionary FILE *dict = fopen(dictionary, "r"); if (dict == NULL) { printf("Could not read.\n"); return false; } ...
l3hargav's user avatar
0 votes
1 answer
102 views

Setting Up PSET 1 IDE Issues

On getting into the PSET 1 IDE i just seem to have a completely empty IDE. For example when i follow the instructions on the CS50 PSET1 Page i get the following: ~/ $ update50 bash: update50: command ...
NicoEF123's user avatar
0 votes
1 answer
465 views

Recover cs50 Please help!

Can somebody please help with this question? ... and also I tried to debug and apparently it doesn't run my while loop and i don't understand why. while (fread(buffer, 512, 1, fraw) == 1) so ...
Bryan Tay's user avatar
1 vote
1 answer
90 views

PSet1: Mario - Less Comfortable (Too many periods)

I recently just tipped my toes into the water of CS50 last week, I'm completely new to this so I need a bit of constructive critisism. I was completed stumped at first, but I got somewhat close - not ...
Dohsure's user avatar
  • 13
0 votes
1 answer
35 views

PSet 3 resize (less)

I'm just trying the "resize horizontally" step for now, but I'm dreadfully confused and can't get it to work. Could someone take a look at my code and nudge me in the right direction? Thank you: /...
royloth's user avatar
0 votes
1 answer
68 views

Help in PSET1: Credit. Check50 not showing up

I finished (what I think) is a correct version of credit and when I submit, I only see marks for style and no check50 on the submit50 page. Also, when I do check50 in the terminal window, I get a "...
Suhas Thalanki's user avatar
0 votes
1 answer
144 views

Where am I going wrong in Similarities: Substrings?

I am currently working on PSet7: Similarities. I have completed all the tests so far except substrings and I was wondering if any of you could tell me where I am going wrong. I am currently failing ...
Jacob Pieczynski's user avatar
0 votes
1 answer
46 views

resize : pset3 not all colors are appering after resizing

so im trying to resize an image of green square that has a smaller white square inside it and when i do the resizing the green square resize but the white one disappears i'dont know where the problem ...
rashad's user avatar
  • 5
0 votes
3 answers
774 views

I am ABSOLUTELY STUCK! (mario less)

Ok, I have tried and have gotten a 60%. I need at least a 70% to pass. Please. Help. Me. Please. Tell. Me. What. Do. I. Do. I am done cash and now I'm stuck on this! Here is my code: #include <...
Akhil Kumar's user avatar
0 votes
1 answer
58 views

Why is my ciphertext printing random values?

I am currently working on Vigenere. I have the code to where it will work if the key is very short (a few characters), but for some reason my program bums out when the plaintext is long or the key is ...
Jacob Pieczynski's user avatar