Questions tagged [help]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1
vote
1answer
21 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 ...
0
votes
1answer
111 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....
0
votes
2answers
80 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, ...
0
votes
1answer
89 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. ...
0
votes
1answer
21 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 ...
0
votes
0answers
41 views

I'm STUCK for a good while in pset3 Tideman last 3 functions :(

I'm mostly concerned about the sort_pairs() function atm, but i'm willing to receive answers regarding the whole code. I can't really see what's wrong with the way i coded it in general, but mostly ...
0
votes
1answer
36 views

PSET4 Resize Only works for half an image

So I thought I finished but the image only half way is written. Not sure what I did wrong but the image scales but only the top half. I tried both ways I could think of for the loop but decided using ...
0
votes
1answer
20 views

Help needed for pointers in C

I need a bit of help for my following program which inputs a string from the user and also prompts from the user a character from that string so as to display the number of times that character is ...
0
votes
1answer
41 views

Pset 3 -> Counting Sort - need tips to find my error

What is wrong in my code? Why am I getting a segmentation fault? void sort(int values[], int n) { int aux_list[65536] = {0}; //map the count of values in the values list as the index of the aux list ...
0
votes
1answer
207 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()...
0
votes
1answer
36 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 ...
0
votes
1answer
30 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 "...
0
votes
1answer
48 views

Segmentation fault in initials.c pset2 cs50 2017

The following is my code for pset2 initials 2017 and I got a segmentation error. Can someone plse help me debug this. Now here's the output : Hello what's your name? ansh parashar ...
0
votes
1answer
45 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) {...
0
votes
1answer
393 views

pset1 Mario Help?

So I understand the bases of the project, what I'm suppose to do etc, but when I prompt the user I get a bug, it also loops forever when I enter a negative integer is that normal? The do and while ...
1
vote
1answer
24 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 ...
0
votes
1answer
209 views

How do I make comments in generate.c program in PSET3?

In the "understanding" section of find/PSET3 in CS50 2017 how do I open the file generate.c so that I can make (TODO) comments in that. I have ran all the commands for "downloading" section which ...
0
votes
1answer
21 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'...
0
votes
1answer
89 views

PSET3 helpers.c

:( finds 42 in {42,40,39,41} \ expected an exit code of 0, not 1 What can I make out of this error message. Here's my code for binary search,selection sort:
0
votes
1answer
257 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 ...
0
votes
1answer
243 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 ...
0
votes
1answer
42 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 ...
1
vote
3answers
47 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) { ...
0
votes
2answers
91 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"
0
votes
2answers
44 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 ...
0
votes
0answers
19 views

cs50 IDE Week 1 submission

I have just finished week 1 and now i m trying to submit it, however I cant seem to do it. How do you submit week one (hello.c) on GitHub? I've looked on GitHub and on the Edx site, but still cant ...
1
vote
1answer
23 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 ...
0
votes
1answer
29 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 ...
0
votes
0answers
40 views

CS50 Pset4 Filter Blur less comfortable

I've tried getting blur done for some time now and I just can't get the border pixels to calculate properly as they continue to go out of bounds. I have noticed that at the start of the program ...
0
votes
1answer
46 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 ...
0
votes
1answer
183 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 ...
0
votes
1answer
21 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 ...
0
votes
0answers
37 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; } ...
0
votes
0answers
13 views

Corrupt sandbox?

Is it possible that my sandbox is currupt? I keep getting an error stating that the compiler wants a ( (not a curly brace) after int main(void). I also get a error stating that the code does not ...
0
votes
1answer
72 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 #...
0
votes
1answer
35 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 ...
1
vote
1answer
85 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 ...
0
votes
1answer
34 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: /...
0
votes
3answers
604 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 <...
0
votes
1answer
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 ...
0
votes
1answer
136 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 ...
0
votes
1answer
65 views

Vigenere-Struggling to understand why garbage values are being printed

I'm extremely new to coding so bear with me. With my code, it, unless both the key and the plaintext are lowercase garbage values, are printed ruining the encryption of the plaintext. I struggle to ...
0
votes
1answer
57 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 ...
0
votes
1answer
54 views

Why isn't my key running cyclically?

I am currently working on Vigenere, and for whatever reason my key values are running through randomly and just not working. I'm new to programming, so sorry if I am missing something major in my code ...
0
votes
1answer
115 views

CS50 Understanding Technology Grading?? CS50.me?

I am taking CS50 Understanding Technology on EdX. I have submitted CS50 Understanding Technology Assignments almost 2 months ago and still haven't gotten grades back for them. I have asked for ...
0
votes
1answer
434 views

Week 6: DNA sequence aligning example: Are running times iterative approach and reqursive same?

once again I'm asking help ( not to provide me with code example or pseudo code ), but for clarification on the problem. It seems that this double loop ( iterative approach ) for (int y2 = y; y2 >...
0
votes
1answer
145 views

Lecture Week 6: Dynamic programming: rod example, is the recursion approach correct?

so then I was watching the lecture and I thought at the time it would be nice to try implement the example (well, partially at least) used in the lecture. I have two questions: Is my approach to ...
0
votes
1answer
58 views

why can't I even log in now ? pset7

code: def index(): """Show portfolio of stocks""" portfolio_symbols = db.execute("SELECT shares, symbol \ FROM log WHERE id = :id", \ ...
0
votes
1answer
91 views

pset2 crack.c Random Characters Follow When Getting Salt

I've been scratching my head at this for the better part of a day now: When I try to save the salt in a separate string called salt using the first and second characters of the second element of argv[...
0
votes
1answer
222 views

PSET 1: Mario help (Drawing pyramid)

Stuck on Pset 1 - drawing the pyramid (prompting the user for a number between 0 and 23 working fine). When I try to execute this program, it goes crazy- is there something wrong with my for loops? ...