What\'s the most \"proper\" way to pass a dynamically sized array to another function?
bool *used = new bool[length]();
I\'ve come up with
static void test(bool arr[])
static void test(bool *arr, size_t size)
For static/dynamic arrays, if you don't want to change location of this pointer.
Example: http://liveworkspace.org/code/c5e379ebe2a051c15261db05de0fc0a9
static void test(bool *&arr)
For dynamic if you want to change location.
Example: http://liveworkspace.org/code/bd03b214cdbe7c86c4c387da78770bcd
But, since you write on C++ - use vectors, instead of raw dynamic arrays.