I am just messing around with the function and somehow palindromes returns 74. I am using Visual studio 2022. Was it supposed to not return anything and catch compiler error since false is never returned in the case below?
bool palindromes(string str) {
if (str.length() == 0 || str.length() == 1) return true;
if (str[0] == str[str.length() - 1])
palindromes(str.substr(1, str.length() - 2));
else
return false;
}
int main()
{
cout << palindromes("lol");
}