bool wm(const char *s, const char *t)
{
return *t-'*' ? *s ? (*t=='?') | (toupper(*s)==toupper(*t)) && wm(s+1,t+1) : !*t : wm(s,t+1) || *s && wm(s+1,t);
}
I have search the internet for ternary/if else equivalents, but this one seems weird because it has a return in the beginning.
from cplusplus website: (condition) ? (if_true) : (if_false)
if(a > b){
largest = a;
} else if(b > a){
largest = b;
} else /* a == b */{
std::cout << "Uh oh, they're the same!\n";
}
Thank You