Linked Questions

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
1 answer
140 views

control may reach end of non void function in move [duplicate]

This is my code for move: for(i=0;i<d;i++) { for(j=0;j<d;j++) { if(a[i][j]==tile) { e=i; f=j; } ...
Amrita's user avatar
  • 50
0 votes
1 answer
69 views

control may reach end of non-void function in pset2 [duplicate]

I wrote a function to check key which has or has not alphabetic character. And It give me that error. Here is my code. and that is also point 112-line } in error. int checkAlpha(string alpha) { ...
Mearex's user avatar
  • 9
0 votes
1 answer
33 views

guys i have an error in game of fifteen [duplicate]

look at my code in the pastebin link i don't understand the errors that are coming: http://pastebin.com/tuE5s3Em the error on compilation was: ~/workspace/pset3/fifteen $ make fifteen clang -ggdb3 -...
Ketan Verma's user avatar
0 votes
1 answer
625 views

CS50 Helpers.C Find Less, No Idea What's Going On

Final Code: /** * helpers.c * * Helper functions for Problem Set 3. */ #include <cs50.h> #include "helpers.h" /** * Returns true if value is in array of n values, else false. */ bool ...
R_C's user avatar
  • 115
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
0 votes
2 answers
503 views

Pset3 - Binary Search : Control may reach end of non void function

I have written my binary search code, but every time i try to compile I get the following error jharvard@appliance (~/Dropbox/pset3/find): make helpers clang -ggdb3 -O0 -std=c99 -Wall -Werror ...
Darkstar108's user avatar
0 votes
2 answers
446 views

pset3 - problem with find.c and helpers.c

i wrote the search code that find.c calls from helpers.c and yet somehow the compiler keeps returning this results. ~/workspace/pset3/find/ $ make find clang -ggdb3 -O0 -std=c11 -Wall -Werror -o find ...
Jere's user avatar
  • 37
0 votes
1 answer
444 views

"Error: control may reach end of non-void function". What causes this error? [duplicate]

I'm working with code (that I am not the primary author of) and trying to get it to run. It tests to see if a number is prime or not. It gives me the error error: "control may reach end of non-void ...
user8357's user avatar
0 votes
2 answers
364 views

Won function of pset3 game of fifteen making error

My code is not able to compile clang is stating error in won function. My code is as follows: /** * fifteen.c * * Computer Science 50 * Problem Set 3 * * Implements Game of Fifteen (...
Quasar's user avatar
  • 1
0 votes
2 answers
109 views

I wrote this program as per the recursion video but its giving one error

here is the code and error is"control may reach end of non-void function [-Werror,-Wreturn-type]" #include <stdio.h> #include <cs50.h> #include <stdlib.h> int collatz( int n, int c);...
Ahmed Raza'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
115 views

pset3 Control reaches end of non void function

I don't know where I'm wrong in my binary search and compiler is showing me this error in both functions. Can you help me find out where I'm getting wrong. bool s(int key, int elm[], int low , int ...
Priyanshu Kumawat's user avatar
0 votes
1 answer
100 views

"make all" for linear search when changing helpers.c results in "error: control may reach end of non-void function"

Here's the problem. After adding to helpers.c a linear search that will return true if the value is found (per the pset3 spec), I "make all" in the terminal to update helpers.c before testing it, but ...
MEK's user avatar
  • 7
0 votes
1 answer
101 views

cant compile water.c

I'm new to this and this is the code ive written and cant figureout what i need to do to fix it. any help would be appreciated thank you #include <cs50.h> #include <stdio.h> #include <...
tanderson's user avatar

15 30 50 per page