Skip to content

Instantly share code, notes, and snippets.

@TheAllenChou
Created October 29, 2021 17:00
Show Gist options
  • Save TheAllenChou/c00433c8c808a676783b1b6adb6840b0 to your computer and use it in GitHub Desktop.
Save TheAllenChou/c00433c8c808a676783b1b6adb6840b0 to your computer and use it in GitHub Desktop.
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