Skip to main content

Questions tagged [compilation-error]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
-2 votes
0 answers
21 views

Hey everyone, I'm facing an issue where my code isn't compiling. Can anyone help me troubleshoot why this might be happening? I really appriciate for

I'm encountering difficulties with my code compilation. Would someone kindly assist me in identifying the underlying issues causing this problem? Your help is greatly appreciated. Thank you!
Naufal Hartono's user avatar
0 votes
1 answer
60 views

cs50 - prime: compiling error understanding

I was trying to understand what I missed in this code. It should loop through the numbers to the current one and confirm whether it is a prime number. #include <cs50.h> #include <stdio.h> ...
Upicky Rizek's user avatar
1 vote
2 answers
1k views

check50 error message when testing test_fuel.py

:) test_fuel.py exist :( correct fuel.py passes all test_fuel checks expected exit code 0, not 2 :| test_fuel catches fuel.py returning incorrect ints in convert can't check until a frown ...
user3348445'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
1 vote
2 answers
70 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
0 votes
1 answer
775 views

incompatible integer to pointer conversion initializing 'char *' with an expression of type 'int'

I keep getting this error when I try to compile my program: incompatible integer to pointer conversion initializing 'char *' with an expression of type 'int' { if (argc != 2) { printf(&...
tabacool's user avatar
0 votes
2 answers
82 views

pset1 mario (less comfortable), expression error

I keep getting 'expression error' when I try to compile my code; any help would be appreciated. Code is as follows: #include <stdio.h> #include <cs50.h> int main(void) { // prompt ...
bw1968's user avatar
  • 5
-1 votes
1 answer
48 views

Do I need to install any compiler for compiling a C program in cs50 sandbox? If not then why am I not being able to compile my program?

I am new to programming and has basicly started with c program but after i write a code and try to compile it by,"make untitled1" I get an error message.
Artinxt's user avatar
0 votes
1 answer
171 views

PSET5 Compiling issue

So I finally finished my code and received 20 errors when attempting to compile, after my first attempt fixing the errors I tried again and received 15 errors, once more and received 17, and now am ...
ayeeitsalpha's user avatar
0 votes
1 answer
99 views

Readability compiling issue

Readability (Problem Set 2) #include <stdio.h> #include <cs50.h> #include <string.h> #include <ctype.h> #include <math.h> // Letters detects letters // Words detects ...
starbvuks's user avatar
0 votes
1 answer
35 views

Expected expression on "valid triangle" exercise? i thought the 'or' symbol was 2 lines ( || ) what have i done wrong here?

#include <stdio.h> #include <cs50.h> #include <string.h> #include <ctype.h> #include <math.h> // PROTOTYPE THE FUNCTON bool valid_triangle(float input1, float input2, ...
Pot Noodle's user avatar
0 votes
2 answers
35 views

Can anyone tell me what ive done wrong and breakdown how to properly prototype and deploy created functions?

code: #include <stdio.h> #include <cs50.h> #include <string.h> #include <ctype.h> #include <math.h> // PROTOTYPE THE FUNCTONS & DECLARE VARIABLES int multiply(int ,...
Pot Noodle's user avatar
0 votes
1 answer
859 views

initializer element is not a compile-time constant and expected identifier or '(' errors

I used the CS50 IDE for C on cloud9. When I run the program I get the errors 3:8: warning: **implicit declaration of function 'GetInt' is invalid in C99 [-Wimplicit-function-declaration] int x= ...
mikeli's user avatar
  • 7
0 votes
2 answers
2k views

Pset 4 filter: reflect help

I have been stuck on pset4 for a while and when I try to compile my code I now get 3 errors in the reflect function which are: helpers.c:83:6: error: conflicting types for 'swap' void swap(int *a,...
ayeeitsalpha's user avatar
0 votes
3 answers
1k views

pset 3 plurality code help

My code prints all names in the case of a two way/threeway tie, but for some reason I still get an error message in check50 that it does not. The only thing I could think of was maybe it had to do ...
ayeeitsalpha's user avatar
3 votes
2 answers
380 views

Can't compile readability in cs50 IDE

I'm trying to do the readability exercise for week 2 in the cs50 IDE and am unable to compile my program. I followed the steps below exactly, but am getting the error message depicted below the steps ...
Kevin Crosson's user avatar
0 votes
1 answer
37 views

scores2 keep giving error even after copying the code verbatim from CS50 2018

I am a beginner in CS50 2018. I was following the 2018 YouTube lecture 2 - Arrays and wrote the codes in CS50 sandbox as the lecture was proceeding. However, I am getting errors even after writing the ...
Simba's user avatar
  • 101
0 votes
1 answer
340 views

Cannot Compile Due to Error in cs50.h

I recently migrated my old Cloud9 IDE over to the new AWS format per instructions and all of my files appeared in the new environment. I had only just completed lecture 1 and was starting to make the ...
Dan's user avatar
  • 3
0 votes
1 answer
176 views

PSET2 Vigenere: Control may reach end of non-void function error

I wrote a function to return the shift value for a certain character inputted. Where A, a = 0, B,b =1, etc. int shift(char c) { int asc; if (isupper(c)) { asc = atoi(&c) - 65;...
Amanda Ramirez's user avatar
0 votes
1 answer
6k views

When compiling I get an error: note: expanded from macro 'get_float'

When I try to compile with make file, I get the following error /usr/local/include/cs50.h:177:91: note: expanded from macro 'get_float' #define get_float(...) __extension__ IF_ELSE(ISEMPTY(...
Evan Carroll's user avatar
0 votes
1 answer
1k views

Compilation error in hello.c: undefined reference to `get_string'

I'm getting the following error after running make hello. I downloaded the latest version of libcs50from the GitHub releases page and installed using sudo make install. I'm running the program on ...
Aadil Ayub's user avatar
0 votes
2 answers
164 views

Keep getting this compile-time message: error: unused parameter 'argv' [-Werror,-Wunused-parameter]

I'm working on pset2 from cs50 and am down to the last bug which I can't seem to wrap my head around. When I read my code, I AM using the parameter argv in line 3. Why the error message? int main(int ...
Jacopo Stifani's user avatar
0 votes
1 answer
112 views

pset5 speller dictionary errors

Can someone give me feedback on my code please? I can't compile this, and it says too many errors. A lot of the errors don't seem to make sense. For example, it says "error: use of undeclared ...
Marie Urbina's user avatar
0 votes
1 answer
72 views

speller make error #endif without #if

When I try to 'make' speller, I get this error message: ./dictionary.h:17:2: error: #endif without #if How can this be, when we were given the dictionary.h file? I haven't changed anything there. The ...
Marie Urbina's user avatar
0 votes
1 answer
436 views

error: linker command failed with exit code 1

While compiling speller using make command the following shows up: /usr/bin/ld: cannot find -lstdbool /usr/bin/ld: cannot find -ldictionary /usr/bin/ld: cannot find -lctype /usr/bin/ld: cannot find -...
rajat008's user avatar
0 votes
1 answer
126 views

Pset3 - Music: Unused parameters and control reaches end of non-void function errors

I have tried and googled everything, but I cannot seem to fix these mysterious errors. Within my helpers.c file, it is saying that I haven't used any of the parameters although I've used all of them. ...
aherzfeld's user avatar
0 votes
1 answer
124 views

PS3's Fifteen won't compile only during check50?

I have created my solution for pset3's problem "Fifteen". It compiles fine with the standard makefile in cs50's on-line terminal window, and runs correctly as well (also tested with the given 3x3 and ...
Carl Colijn's user avatar
0 votes
1 answer
437 views

CS50 pset 4 recover.c timed out while waiting for program to exit

#include <stdio.h> #include <stdlib.h> #include <stdint.h> #include <string.h> typedef uint8_t BYTE; int main(int argc , char* argv[]){ //checking number of arguments ...
Crazy8's user avatar
  • 1
0 votes
1 answer
816 views

Problem with "expression result unused error" in for-loop?

I am getting an error message of "expression result unused" for the bottom two for loops (specifically h + 1 and s - 1). I've tried looking for through the other questions for an answer but nothing ...
Micky's user avatar
  • 1
0 votes
1 answer
164 views

pset5 load function has "expression result unused" errors

I think this relates to my understanding (or lack of) of pointers. I have 3 errors for the following code -- this is just inside my while statement. Both root and current are defined as nodes and ...
KitSeason's user avatar
0 votes
1 answer
19 views

Pset2: Code not compiling for Initials

I wrote code for Initials, but when I put the command to make initials.c in the window, it gives me the message : make: *** No rule to make target `initials.c'. Stop. I tried compiling the programs ...
Rujul Gandhi's user avatar
0 votes
1 answer
86 views

strange error message when compiling helpers.c

I am very new to programming. When I try and compile helpers.c using the command "make helpers" I get the following error messages: /usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/crt1.o(....
adam kirsch's user avatar
0 votes
1 answer
1k views

compiling clang string.c says relocation 0 has invalid symbol index 11

When i try to compile string.c file whose code is given below it say relocation 0 has invalid symbol index 11 ... and this happens on and on.. my code is : - #include <cs50.h> #include <...
umar's user avatar
  • 1
1 vote
1 answer
71 views

Error in Caesar , can't fix . Need help

#include <stdio.h> #include <cs50.h> #include <string.h> #include <ctype.h> #include <stdlib.h> int main(int argc, string argv[]) { if (argc == 2) ...
Mahip's user avatar
  • 11
0 votes
1 answer
72 views

What does "using" a variable entail and why does this inconsistency come up? (pset1, greedy, general question)

During the greedy problem in pset1 I wrote this function: void greedy(int coin_type, int *change, int *coins) { while (*change / coin_type > 0) { *coins++; *change -= coin_type;...
Chris Offner's user avatar
0 votes
1 answer
511 views

pset1 - Greedy Errors "error: expected expression"

Please help! I cant solve some errors (from: [http://docs.cs50.net/problems/greedy/greedy.html][1]) running this code: int main(void) { float change = 0; int coin_used = 0; int change2 = ...
Pablo Dip's user avatar
0 votes
1 answer
48 views

CODE ON http://cdn.cs50.net/2015/fall/lectures/1/w/src1w/thadgavin.c NOT WORKING [duplicate]

ERROR MESSAGE FOR CODE// URL/// http://cdn.cs50.net/2015/fall/lectures/1/w/src1w/thadgavin.c clang -ggdb3 -O0 -std=c11 -Wall -Werror -Wshadow coolcode.c -lcs50 -lm -o coolcode /usr/bin/ld: /...
GHOST's user avatar
  • 1
0 votes
2 answers
7k views

Subscripted value is not an array

I am using exactly the same code as at HowStuffWorks to create a bubbling sorting. But I cannot compile code as I get the following error message: sorting.c:29:22: error: subscripted value is not an ...
Sergey Ryabov's user avatar
0 votes
1 answer
740 views

Pset3- Find: "control may reach end of non-void function" (error)

I know that this question has been asked before, but none of the answers have helped me. I keep getting the "control may reach end of non-void function" error when I try to make find after editing ...
Iris Frenzy's user avatar
1 vote
2 answers
133 views

PSET6 server: Make server error - Please please help =(

I was almost finished debugging server.c (the only thing that didn't work was that I was getting a 404 error when submitting my query on hello.html) by using gdb. When I thought I'd noticed what the ...
user9805's user avatar
0 votes
1 answer
13k views

How to fix the `unused variable` error?

I understand how to extract the query from request line, but when I make the program, it gives me the error unused variable query although it's used later in the code. I don't know what's wrong. here ...
kawegan's user avatar
  • 76
1 vote
1 answer
172 views

pset3 - recursive binary search not compiling

I wrote a recursive function for binary search in pset" and I keep getting the same error from clang: "control may reach end on non-void function" it is driving me crazy... some help would be very ...
DavNej's user avatar
  • 13
1 vote
1 answer
794 views

How to fix the "undefined references to GetString" error?

I can't get the GetString() function from the cs50 library to work. I have tried update50 and have rebooted several times and it is still throwing out this error: jharvard@appliance (~/Dropbox): ...
BoBbY's user avatar
  • 25
0 votes
1 answer
200 views

"Control may reach end of non-void function" but I'm sure my else statements take care of it? [duplicate]

I know this has been asked many times before, but I looked through all the questions and still don't get it. I know what the error means, I'm just convinced that my code ensures that whatever happens,...
mathmagician's user avatar
0 votes
0 answers
1k views

how to fix the "expected identifier of '('" error?

what does this error mean? expected identifier or '(' { ^
Ani's user avatar
  • 61
0 votes
1 answer
379 views

compilation error multi-character character constant in caesar

The code is: string plaintext = GetString(); for (int i = 0, n = strlen(plaintext); i < n; i++) { printf("%c", plaintext[i]); if ((isalpha(plaintext[i])) && (isupper(...
user7489's user avatar
0 votes
2 answers
3k views

why do I get "error: expected expression" when I try to compile my binary search implementation?

Having some trouble figuring out this error message as I write the Binary Search function. Any advice greatly appreciated! bool binarySearch(int key, int array[], int min, int max); bool search(int ...
Jon Levin's user avatar
0 votes
0 answers
28 views

Am I using the "return" statement incorrectly?

I am getting this error message while trying to compile: "error: expected identifier or '('" "return (int)" ^ My code preceding the "return (int)" is a do ...while loop that sets int as n and uses "n ...
Mark Leccese's user avatar
0 votes
1 answer
3k views

How to fix the "expression result unused" compilation error?

When I try to run this code through the compiler, I get the error: expression result unused referring to the line cents - 25; How do I fix this error? How exactly do I "use" the expression ...
user7489's user avatar
0 votes
1 answer
1k views

Error: control may reach end of non-void function [duplicate]

I am currently working on pset3/search and when I try to compile the codes it keeps telling me that ^ error. I know that it is because I must not be returning a boolean value as needed, but I do not ...
Dafne Lecona's user avatar