Skip to main content

Questions tagged [error]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
-1 votes
0 answers
10 views

I would like to have a fix about undeclared identifier'cci'

When i try to save underlying study in pine editor (tradingview) ,i always get an error:undeclared identifier 'cci' 8c7655f5-da24-4e03-9e0d-5a17e1716468.pine study("CCI coded OBV", ...
Bart Goossens's user avatar
0 votes
0 answers
40 views

CS50p - PSet4 - Adieu - Exit code 1

So, I have supposedly finished my code for the Adieu exercise from Problem Set 4. I tested all of the inputs that check50 uses and I get the right feedback from my code. However, when I run check50 it ...
PquePC's user avatar
  • 1
0 votes
0 answers
144 views

Line 32: Char 5: error: redefinition of ‘main’ [solution.c] 35 | int main(int argc, char *argv[]) { | ^~~~.Why this is showing in my C program

#include<stdio.h> #include<ctype.h> int main() { int nums[] = {1,3,4,5,6}; int i, j, x=10, n; printf("target="); scanf("%d",&n); int size =...
Shimul Das's user avatar
0 votes
0 answers
234 views

parse error: no such table

I'm currently on week 1 of cs50's SQL course, running into some issues with the exercise. Running the code from both the file and the terminal results in a no such table, despite me already ...
Bryant Rusli's user avatar
0 votes
1 answer
67 views

Problem with my code (Problem Set 1 - Credit)

#include <cs50.h> #include <stdio.h> int checksum(long n); int main(void) { long card_number; int k; // Prompt user for card number do { card_number = ...
Sailord2021's user avatar
0 votes
2 answers
60 views

Stuck on Lab 1 #CS50

I'd appreciate your help as I'm stuck on the last part of Lab 1. #include <cs50.h> #include <stdio.h> int main(void) { // TODO: Prompt for start size int start; do { ...
Kareem's user avatar
  • 1
0 votes
0 answers
104 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
30 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
24 views

My floating point value won't return the decimal point

#include <cs50.h> #include <ctype.h> #include <stdio.h> float calc_hours(int hours[], int weeks, char output); int main(void) { int weeks = get_int("Number ...
Harr's user avatar
  • 35
0 votes
1 answer
14 views

Getting "error: expected identifier or '('" error and I don't know why

char rotate(char c, int n); { int upper[] = {65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90}; int lower[] = {97, 98, 99, 100, 101, 102, 103, 104,...
Harr's user avatar
  • 35
1 vote
1 answer
657 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
260 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
17 views

Getting error expected ')' and I don't know why

if ((word{i} >= 'a' && word{i} <= 'z') || (word{i} >= 'A' && word{i} <= 'Z')) { while (points{j} < word{i}) { j++; } ...
Harr's user avatar
  • 35
0 votes
1 answer
29 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
18 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.");...
Harr's user avatar
  • 35
0 votes
1 answer
154 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 ...
Harr's user avatar
  • 35
0 votes
0 answers
192 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 ...
Jonathan's user avatar
0 votes
1 answer
37 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 :) ...
thefriendlyg's user avatar
0 votes
1 answer
405 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][&...
theiNhibition's user avatar
0 votes
2 answers
355 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 ...
Gabriel Tierra's user avatar
0 votes
0 answers
35 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" ...
ger mc's user avatar
  • 1
0 votes
0 answers
659 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 ...
Abhishek kumar Singh's user avatar
0 votes
1 answer
18 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++) ...
user14288642's user avatar
0 votes
0 answers
71 views

CS50-C compiler doesn't working

I can't run the code on cs50 C section is there something wrong with my compiler
user14288642's user avatar
0 votes
1 answer
11 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 ...
Samartha Khare's user avatar
0 votes
0 answers
88 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 ...
Alvaro Barboza's user avatar
0 votes
1 answer
83 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 ...
Jaron Haberstroh's user avatar
0 votes
1 answer
44 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> ...
tsull's user avatar
  • 1
0 votes
1 answer
553 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 ...
the-great-potato's user avatar
1 vote
1 answer
526 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,...
Flo's user avatar
  • 11
1 vote
1 answer
335 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 ...
the-great-potato's user avatar
0 votes
1 answer
391 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 ...
J.Wallwork's user avatar
0 votes
2 answers
365 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 ...
mandle565's user avatar
1 vote
2 answers
69 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 ...
Calvin Lee's user avatar
1 vote
1 answer
351 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 ...
CAM_etal's user avatar
0 votes
1 answer
582 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 ...
monkdogz's user avatar
0 votes
1 answer
24 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
Pat's user avatar
  • 1
0 votes
0 answers
91 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&...
Dayan Mehrani's user avatar
2 votes
1 answer
3k 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 ...
Programming 55's user avatar
0 votes
1 answer
22 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
rodolfode dion's user avatar
-1 votes
1 answer
167 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[...
BadboyNicholai's user avatar
0 votes
2 answers
119 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)...
General Noob's user avatar
0 votes
1 answer
39 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 ...
diegobueno's user avatar
0 votes
1 answer
124 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
Thiranida Tangjadetanapon's user avatar
0 votes
1 answer
43 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 (...
Bob Cap's user avatar
0 votes
1 answer
57 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(&...
General Noob's user avatar
0 votes
0 answers
2k 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 ...
Srikrishna Karatalapu's user avatar
0 votes
1 answer
284 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 "...
Amie's user avatar
  • 3
0 votes
1 answer
412 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 -...
dh45r's user avatar
  • 1
0 votes
1 answer
390 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 ...
001snake's user avatar

1
2 3 4 5 6