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, the function will return something
Here's the code (it's for helpers.c in pset3):
#include <cs50.h>
#include "helpers.h"
bool search(int value, int values[], int n)
{
if(n > 0)
{
for(int i = 0; i < n; i++)
{
if(values[i] == value)
{
return true;
}
}
}
else
{
return false;
}
}
I will really appreciate any help, as this is driving me absolutely crazy :)