Linked Questions

0
votes
1answer
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,...
0
votes
1answer
136 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; } ...
0
votes
1answer
63 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) { ...
0
votes
1answer
32 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 -...
0
votes
1answer
734 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 ...
0
votes
1answer
563 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 ...
0
votes
2answers
492 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 ...
0
votes
2answers
430 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 ...
0
votes
1answer
396 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 ...
0
votes
2answers
310 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 (...
0
votes
2answers
99 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);...
0
votes
1answer
115 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. ...
0
votes
1answer
114 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 ...
0
votes
1answer
92 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 ...
0
votes
1answer
97 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 <...

15 30 50 per page