Questions tagged [error]
The error tag has no usage guidance.
272
questions
0
votes
0
answers
6
views
Hi, i was trying to add cs50 library, when i go inside the tests folder and i try to make it, it gives me an error, i don't know what to do here
can anybody help me? I've been trying to add the library for two days, and I also want to add the other libraries to be able to do the problems without wifi
0
votes
0
answers
29
views
Pset9 Check50: buy handles valid purchase
I'm almost done with Finance but my solution doesn't pass the last tests of Check50. I'm stuck on the buy function. Check50 outputs the following: "buy handles valid purchase expected to find &...
0
votes
1
answer
9
views
How do I combine variables and words in a sentance?
printf("%i\n", quarters, "quarters,", "%i\n", dimes, "dimes,", "%i\n", nickels, "nickels", "%i\n", pennies, "pennies.");...
0
votes
1
answer
11
views
Getting: expected identifier or '(' error and I don't know why
int calculate_quarters(int cents);
{
// TODO
int quarters;
for(quarters = 0; cents >= quarters; quarters++)
{
cents = cents - 25;
}
return quarters;
}
The error happens ...
0
votes
0
answers
32
views
Pset 9 Finance 'TypeError: 'NoneType' object is not subscriptable'
I'm currently doing Finance, for CS50x 2023, but I keep getting the same 'nonetype' object is not subscriptable error. I have tried to debug the error and found out that it is the user_id variable ...
0
votes
1
answer
28
views
there is a logical error I can't really catch up with
Output:
Results for cs50/problems/2022/x/credit generated by check50 v3.3.7
:) credit.c exists
:) credit.c compiles
:) identifies 378282246310005 as AMEX
:) identifies 371449635398431 as AMEX
:) ...
0
votes
0
answers
75
views
Problem of C$50 finance in accessing IEX
I'm now working on the problem set 9 Finance.
When I came into the "Quote" Section, I found that my lookup function always returned None.
So I tried to access the original url like [https://...
0
votes
1
answer
148
views
PSET 9 Finance Index Function (jinja2.exceptions.UndefinedError: 'row' is undefined)
I have tried using dot notation in the index.html for loop. I referred to Lab 9 to check my syntax and ensure that I am passing variables correctly from app.py. I have also used flash(stock_rows[0][&...
0
votes
2
answers
91
views
cs50 error - Linker command failed with Exit code 1
I've been trying to do one of the sample programs in lecture 1 and keep being prompted with the same error. However, when running a simple "Hello, world" program it executes fine. I've ...
0
votes
0
answers
13
views
My codespace updated, now I cant compile my mario.c program to continue where I left off. Details below. Any help appreciated
I was away for a month and just opened up my codespace to finish my mario.c problem set.
I had got the columns printing etc but still lots to do.
I had to update my codespace, and "rebuild"
...
0
votes
0
answers
377
views
Invalid operands to binary expression ('std::string' (aka 'basic_string<char>') and 'char')
int main(){
int t;
cin>>t;
while(t--){
int n,sum=0;
cin>>n;
string s[n];
for(int i=0;i<n;i++)
cin>>s[i];
int dec_value = 0;
// Initializing base value to 1, i.e 2^0
...
0
votes
0
answers
10
views
Pset 1 - Having trouble with SSH
I keep getting the error message "No such file or directory" after i copy and paste "cat tilde/.ssh/ir_rsa.pub". I'd appreciate any advice!
0
votes
0
answers
23
views
Please point out my mistake
the course i belong to is CS50 Ai. project 0 Tic-tac-toe. I've completed the project to the best of my abilities, but some problem is still making the Ai, when playing O, fill the next empty space ...
0
votes
1
answer
13
views
cs50 make mario Hello I'm new to cs50 course when doing make mario i got this error
#include <cs50.h>
#include <stdio.h>
int main(void)
{
int n;
do
{
n = get_int("Width: ");
}
While (n < 1);
for (int i = 0; i < 4; i++)
...
0
votes
0
answers
18
views
CS50 - Why does i get clang:error: linker when make calculator
[![enter image description here][1]][1]
Why does my code get an clang: error: linker command failed with exit code 1 (use -v to see invocation)
[1]: https://i.stack.imgur.com/zrqTU.png
0
votes
0
answers
30
views
CS50-C compiler doesn't working
I can't run the code on cs50 C section is there something wrong with my compiler
0
votes
1
answer
10
views
Idk why this error is coming can anyone help
Link to problem: https://leetcode.com/problems/shifting-letters/#:~:text=Shifting%20Letters%20%2D%20LeetCode&text=You%20are%20given%20a%20string,z')%20%3D%20'a'%20.
string shiftingLetters(string ...
0
votes
0
answers
58
views
HELP, error on VS Code, new programmer, CONTAINER ERROR
I'm in the middle of finalizing pset4/filter-more.
Just last night I got the error that you can see in the image attached.
What could be the cause? A virus?
I'm new to programming and really don't ...
0
votes
0
answers
12
views
Integrated Terminal and Debugger produce different results
Objective: Print the name/s with the highest votes
So I was debugging my PSET3 Plurality for probably 8+ hours now. I thought everything was fixed since the result in the debugger was what I intended, ...
0
votes
1
answer
53
views
PSET 2 Readability: undefined reference to `count_letters'
I'm receiving the error:
/usr/bin/ld: /tmp/readability-1786f7.o: in function main': /workspaces/109105972/readability/readability.c:19: undefined reference to count_letters'
clang: error: linker ...
0
votes
0
answers
427
views
CS50x 2022 PSet 9 Finance - check50 failing
I'm currently doing PSet 9, Finance, for CS50x 2022. The web app works fine on my own computer, but when I run it using check50, it is unable to register the user (because of a NoneType object not ...
0
votes
1
answer
34
views
Error when calling seconnd function - expected expression
I'm trying to call my encryption function and am getting an undeclared identifier error. Not sure where i'm going wrong.
Code:
#include <cs50.h>
#include <stdio.h>
#include <ctype.h>
...
0
votes
0
answers
16
views
Need help with my terminal, I have been strugggling with it one day😭
I don't know what's wrong with my terminal today. Where is my dollar sign???
With these weird" /workspace/..#", I run ./sort1 reversed10000.txt and the output wil be
time: can't execute './...
0
votes
0
answers
28
views
An error message that I have been getting since I tried to update cs50 codespace
For some strange reason I have been getting the following error (in the picture) since I tried to update the cs50 codespace. Do any of you have any idea how to resolve this? Also now the terminal is ...
0
votes
1
answer
372
views
CS 50 Pset 1 cash: non-void function does not return a value
I have finish a program and it can run smoothly on other platform like replit... But one I run it on vs code it shows the following error and it also have something weird happen when I run check 50 ...
0
votes
0
answers
77
views
Why am I getting the 404 error everytime i try to use the the server?
In all the tasks where I need a server, I am getting stack. If I run http-server or flask run (in different tasks), I get a 404 error. please help me fix this and check my work.
1
vote
1
answer
409
views
CS50P - Error in pset2 (Coke)
In pset2 (Loops), 2nd problem ("Coke"),
I believe there's an error in the 4th test that check50 performs: it requires an output of $0.50 after the user entered $0.30. The full price is $0.50,...
1
vote
1
answer
162
views
VS code malfunction
On this morning when I open my vs code I found this suddenly pop out. I ignore it and start coding. Afterward I found that I can save my codes, so I code it in notepad and I save it to vs code using ...
0
votes
1
answer
186
views
Lab 3 error message: Incorrect assignment of sorts
When I try to submit my answers I get these messages on running check50:
:) answers.txt
:) answers all questions
:( correctly identifies each sort
Incorrect assignment of sorts.
I'm not sure I'm ...
0
votes
2
answers
88
views
defining a char variable, why am i getting this error?
#include <cs50.h>
#include <stdio.h>
int main(void)
{
int height;
do
{
height = get_int("height: ");
} while (height < 1 || height> 8);
const ...
1
vote
2
answers
53
views
PSet1 - Coins issue
While doing the Coins problem set, I am receiving an error while trying to compile and I can't figure out what the issue is.
"cash.c:53:27: error: variable 'cents' used in loop condition modified ...
1
vote
1
answer
253
views
Compiling Error: Make function not working
I'm just starting out, using VS code as my IDE. Here is my code
#include <stdio.h>
//here were are setting up a function
//meow(void) means it takes no arguments
//void at the beginning is ...
0
votes
0
answers
734
views
Can't Run Debug50 on VsCode!
Referencing the issue below: Can't run debugger
0
votes
1
answer
410
views
Tideman - "lock_pairs skips final pair if it creates cycle" - Almost there!
Getting good results in test cases. Hoping someone can point out where I'm going wrong! I'm also open to general code comments.
// Lock pairs into the candidate graph in order, without creating cycles
...
0
votes
1
answer
22
views
Pset0 - error & fatal error
How can I resolve this problem? Is it a library problems?Is there any mistake in setting?
Appreciate before hand!
https://i.stack.imgur.com/NVXxo.png
0
votes
0
answers
80
views
pset1 Mario error: expected identifier
I really tried to find the solution for myself, but after a lot of hours I give up. Here is the error message and code if its possible please help me:)
#include <cs50.h>
#include <stdio.h&...
2
votes
1
answer
2k
views
Can't run debugger
I'm trying to run the debugger, by typing into the terminal:
debug50 ./filename
But unfortunately an error comes up in the terminal, saying:
Failed to connect extension server on port None.
Please ...
0
votes
1
answer
17
views
How can i fix it
Whenever I press the keyboard, this error report always pops up, how can I solve it?
I have tried restarting the IDE, but it doesn't seem to work
-1
votes
1
answer
82
views
PSET4 - Filter(more)- Edges- Check50 error
#include"helpers.h"
#include <math.h>
int check_cap(int num);
void edges(int height, int width, RGBTRIPLE image[height][width])
{
RGBTRIPLE image_copy[...
0
votes
2
answers
85
views
PSET6 Readability "unsupported operand type(s) for *: 'float' and 'NoneType'"
I'm getting "unsupported operand type(s) for *: 'float' and 'NoneType'" error for line 34: "s = (100 / words) * sentences".
Not sure what to make of this since count_sentences(text)...
0
votes
1
answer
29
views
What`s my code not work?
The code is
#include <stdio.h>
int main(void)
{
printf("hello, world");
}
but when i execute ./hello.c the result is
~/ $ ./hello.c
./hello.c: line 3: syntax error near ...
0
votes
1
answer
91
views
Mario.c:19:36: error: use of undeclared identifier 'row'
I am not sure what I am doing wrong...
I made 16 same errors of different identifiers but I am not sure why
0
votes
1
answer
40
views
Why is it asking me to declare (s) when is has been declared already?
#include <stdio.h>
#include <cs50.h>
#include <math.h>
#include <string.h>
#include <ctype.h>
bool is_valid_key(string s);
int main(int argc, string argv[])
{
if (...
0
votes
1
answer
49
views
PSET5 Why Speller can't load dictionary? (included HASH function in case it's relevant)
// Load function
bool load(const char *dictionary)
{
char word[LENGTH + 1];
FILE *file = fopen("dictionary", "r");
if (file == NULL)
{
printf(&...
0
votes
0
answers
1k
views
Invalid slug error
When trying to go through the steps in lab 1 for hello.c. I am getting the below error
~/ $ check50 cs50/problems/2021/pset1/hello ...
0
votes
1
answer
166
views
pset9: finance // jinja syntax error in index
I'm working on my index page and I have two errors. For the first, I'm not sure what's wrong. It seems like it's something with my return statement but I have no idea what's wrong with it.
File "...
0
votes
1
answer
182
views
error : function definition not allowed here pls help
i got this error message
pls help
$ make triangle
clang -ggdb3 -O0 -std=c11 -Wall -Werror -Wextra -Wno-sign-compare -Wno-unused-parameter -Wno-unused-variable -Wshadow triangle.c -lcrypt -lcs50 -...
0
votes
1
answer
357
views
debug50 error in online IDE: 'MODULE_NOT_FOUND'
While working on pset3 tideman problem, I attempted to use the debugger and got this error in return. the debugger opens and then closes immediately, and generates the below text. How can i resolve ...
0
votes
1
answer
2k
views
Why does it keep saying error: no such file or directory?
I am on part 1. The hello program worked and I'm trying to do the long int addition. It keeps saying "no such file or directory" but I can the the file with my own lion eyes and am stumped ...
0
votes
1
answer
45
views
PSET6 - Readability. When I am running my program it is showing me this error again and again
The error I am getting
Traceback (most recent call last):
File "/home/ubuntu/pset/pset6/readability/readability.py", line 46, in
<module>
main()
File "/home/ubuntu/pset/pset6/...