Given a function like so
bool RequestStatus()
{
...
if (code == myCode) {
return true;
} else {
return false;
}
}
Why would the compiler complain that "Function should return value". Unless I am missing something, how else could it not return true or false? Is it because the value of myCode is runtime dependent so the compiler is not sure on the logical paths?