title: C++ Pass a reference to an array to function
body: <p>Given to functions void main() and void hello(byte* a[4]). Main function has an array of four bytes. The array's reference needs to be passed to the function hello for manipulation. I would expect the right syntax to be:</p>
  
  <pre><code>void hello(byte* a[4]){
   // Manipulate array
   a[0] = a[0]+1;
  }
  
  void main(){
   byte stuff[4] = {0,0,0,0};
   hello(&amp;stuff);
   // hopefully stuff is now equal {1,0,0,0}
  }
  </code></pre>
  
  <p>Alternatively I see others using this form of decaration:</p>
  
  <pre><code>void hello(byte (&amp;a)[4])
  </code></pre>
  
  <p>Is this the right way to do it?</p>