title: Difference between [square brackets] and *asterisk
body: <p>If you write a C++ function like</p>
  
  <pre>
  void readEmStar( int *arrayOfInt )
  {
  }
  </pre>
  
  <p>vs a C++ function like:</p>
  
  <pre>
  void readEmSquare( int arrayOfInt[] )
  {
  }
  </pre>
  
  <p>What is the difference between using [square brackets] vs *asterisk, and does anyone have a style guide as to which is preferrable, assuming they are equivalent to the compiler?</p>
  
  <p>For completeness, an example</p>
  
  <pre><code>void readEmStar( int *arrayOfInt, int len )
  {
    for( int i = 0 ; i &lt; len; i++ )
      printf( "%d ", arrayOfInt[i] ) ;
    puts("");
  }
  
  
  void readEmSquare( int arrayOfInt[], int len )
  {
    for( int i = 0 ; i &lt; len; i++ )
      printf( "%d ", arrayOfInt[i] ) ;
    puts("");
  }
  
  int main()
  {
    int r[] = { 2, 5, 8, 0, 22, 5 } ;
  
    readEmStar( r, 6 ) ;
    readEmSquare( r, 6 ) ;
  }
  </code></pre>