I cannot figure out why this error is happening: error: control may reach end of non-void function
error: control may reach end of non-void function
Here is the code:
bool search(int val
Some folks will probably hate this, but....
bool search(int value, int values[], int n) { if (n < 1) { return false; } bool ret = false; for (int i = 0; i < n; i++) { if (values[i] == value) { ret = true; break; } } return ret; }