The others have given you some direction to solve your issue, but are you aware there's a bug in your code? You have
bool All(bool *iterable) {
for(int i = 1; i < sizeof(iterable)/sizeof(*iterable); ++i) {
C++ does not carry around array sizes, so
sizeof(iterable)
will be the size of a pointer on your system - probably 4 or 8 bytes. In this case
sizeof(*iterable)
equals sizeof(bool) which is 1. So the loop index will go from 1 to <bytes in="" pointer="">, regardless of how the array is that
iterable
points to.
The use of the sizeof division only works with arrays of known size at compile time e.g.
double d[]{ 1.0, 2.5, 3.14, 4.7, 5.0, 6.9, 17}; size_t d_len = sizeof(d)/sizeof *d;