Created
October 29, 2021 17:00
-
-
Save TheAllenChou/c00433c8c808a676783b1b6adb6840b0 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bool (*functions[])() = | |
{ | |
Function0, | |
Function1, | |
Function2, | |
}; | |
bool LogicalAnd() | |
{ | |
for (auto f : functions) | |
if (!f()) | |
return false; | |
return true; | |
} | |
bool LogicalOr() | |
{ | |
for (auto f : functions) | |
if (f()) | |
return true; | |
return false; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment