cs50 Questions

13

I'm trying to create a program that checks for repeated characters within the command line argument's string. The string is suppose to contain only 26 characters, and all characters have to be alph...
Vaseline asked 3/7, 2020 at 23:13

3

I am currently learning C, taking a CS50 online class via EDX/Harvard. They have us using Clang inside the CS50 IDE/Sandbox which is cloud-based. They haven't explained how to use Clang outside of ...
Mizuki asked 16/9, 2020 at 6:11

3

Solved

I've completed speller and passed all checks. But I'm still bugged about the performance. I did my best with research and running tests, but my implementation is slower by 10-20% compared to staff'...
Teaser asked 1/3, 2022 at 19:38

4

Why is there a runtime error? I made range2 a long long. Code: /*VARIABLES FOR WHILE LOOP*/ long long range1 = 9; int length = 1; /*FIND NUM'S LENGTH*/ while (NUM > range1) { long long...
Convey asked 6/12, 2016 at 3:2

6

import os from sqlalchemy import create_engine from sqlalchemy.orm import scoped_session, sessionmaker engine=create_engine(os.getenv("DATABASE_URL")) db = scoped_session(sessionmaker(bind=engine...
Halfwit asked 15/4, 2020 at 20:27

6

Solved

I'm attempting to use a C library for an opencourseware course from Harvard. The instructor's instructions for setting up the external lib can be found here. I am following the instructions speci...
Duncandunce asked 28/7, 2012 at 5:13

7

Solved

I've got a problem with something I'm programming. I get this error over and over; jharvard@appliance (~/Dropbox/pset1): make mario clang -ggdb3 -O0 -std=c99 -Wall -Werror mario.c -lcs50 -lm -o ma...
Lunch asked 23/12, 2012 at 14:12

1

Solved

I'm new to stackoverflow and pretty new to programming. I'm working on the tideman problem for the CS50 course. https://cs50.harvard.edu/x/2020/psets/3/tideman/ When I run check50 everything checks...
Toogood asked 1/8, 2020 at 11:50

2

I've a rather curious question, not very practical at all really. The error (reading a binary file in r mode) is in plain sight but I'm confused by something else. Here's the code- #include<st...
Bawd asked 10/6, 2020 at 11:4

3

Solved

Here's a snippet of some supplied (CS50) code that declares the same STRUCT 'triple', over and over again inside of a nested loop. Why is this okay? In my mind, it would be more efficient to declar...
Nagel asked 14/9, 2019 at 19:20

5

Solved

In C writing function declarations before main seem redundant. I don't want to use these methods: Write the functions in a different file then import on top. Write the whole function befor...
Decompound asked 26/7, 2019 at 10:43

1

I have been working on the problem set speller for the last days and so far this is what I have. Unfortunately, it does not compile and I am a bit lost. I would be really grateful if somebody...
Downpipe asked 14/9, 2018 at 13:47

1

This is one of my first programs in Python, so I might be missing something obvious. In this first part of my code that I've posted, I'd like to make sure the user passes a command line argument. ...
Knowhow asked 22/3, 2018 at 0:39

4

Solved

I am taking an open online course CS50 from Harvard. The last lecture I had was about memory allocation and pointers (two concepts which are absolutely new to me). What was taught is that malloc(...
Cape asked 23/12, 2017 at 21:46

1

Solved

I hope someone can help me. I am working through CS50x and am working on Pset1 - greedy. I am getting the following error whenever I compile my code: /tmp/greedy-46be96.o: In function `main'...
Circular asked 13/9, 2016 at 14:35

2

Solved

My question is connected with task from CS50, pset5. For ones who don't know any about that, I'll try to explain. Nothing very special. I just need to make function which will intake dictionary fil...
Apparitor asked 14/7, 2016 at 5:43

3

As one of the assignments in Harvard's CS50 course, students are tasked with creating a spell checking program. The main thrust of the assignment is speed - pure speed - and I've gotten to the poin...
Brittenybrittingham asked 17/5, 2016 at 22:31

3

Solved

I'm trying to convert each letter in a string to it's ASCII number. Using int letter = (atoi(ptext[i])); gives me this error: error: incompatible integer to pointer conversion passing 'char'...
Burkey asked 9/11, 2013 at 7:34

3

Solved

I am using the CS50 appliance from Harvard and trying to make a character lowercase. I am trying to use the tolower() function but when I try to use it I get the message implicit declaration of fun...
Rolan asked 27/9, 2012 at 3:11

1

Solved

I'm getting some problems on compiling a very very simple name.c file on Mac OSX Lion. Now, I started following Harvard CS50 course on cs50.net. I'm not totally new to programming but I was curiou...
Kolnos asked 24/8, 2012 at 13:19

6

Solved

It's all in the title; super-simple I reckon, but it's so hard to search for syntactical things anywhere. These are two library files that I'm copying from CS50.net, and I'm wondering why they hav...
Ludivinaludlew asked 8/11, 2009 at 3:5
1

© 2022 - 2024 — McMap. All rights reserved.