title: C++ Array Shuffle
body: <p>I'm fairly new to C++ and don't quite understand function parameters with pointers and references.  I have an array of Cards that I want to shuffle using the Fisher-Yates shuffle.   The deck is declared as</p>
  
  <pre><code>Card *deck[deckSize];
  </code></pre>
  
  <p>where deckSize has been declared as 24.  The array is then initialized.
  I then call the shuffle function:</p>
  
  <pre><code>void shuffle (Card * deck[]) {
      int deckSize = 24;
      while (deckSize &gt; 1) {
         long int k = lrand48();
         k = k %24;
         deckSize--;
         Card * temp = deck[deckSize];
         deck[deckSize] = deck[k];
         deck[k] = temp;
      }
  }
  </code></pre>
  
  <p>If I try to print the value of a card after calling the shuffle function I get a seg fault.  Any pointers on how to do this properly?</p>