title: Proper way to pass dynamic arrays to other functions
body: <p>What's the most "proper" way to pass a dynamically sized array to another function?</p>
  
  <pre><code>bool *used = new bool[length]();
  </code></pre>
  
  <p>I've come up with a few ways that compile but I'm not too sure on what the correct way is.</p>
  
  <p>E.g.</p>
  
  <p>Would these pass by value?</p>
  
  <pre><code>static void test(bool arr[])
  
  static void test(bool *arr)
  </code></pre>
  
  <p>Would this one pass by reference?</p>
  
  <pre><code>static void test(bool *&amp;arr)
  </code></pre>
  
  <p>Thanks</p>