title: c++: function arg char** is not the same as char*[]
body: <p>I am using g++.  I am using code that had a <code>main(int,char**)</code>, renamed so I can call it.  I looked at <a href="https://stackoverflow.com/questions/779910/should-i-use-char-argv-or-char-argv-in-c">Should I use char** argv or char* argv[] in C?</a>, where <code>char**</code> is said to be equivalent to <code>char* []</code>.  This does not appear to be true in c++ function calls.  For example:</p>
  
  <pre><code>void f1(char** p){;}
  
  void f2(char* p[]){
  
     f1(p);
  
   //...`
  
  }
  </code></pre>
  
  <p>fails with the compiler complaining "cannot convert <code>char (*)[]</code> to <code>char**</code>..."  The references I look to say that arrays are converted to pointers for the call, but this does not seem to be the case as:</p>
  
  <pre><code>void f3(char* [] p);
  
  char caa[16][16];  
  f3(caa);
  </code></pre>
  
  <p>also fails.   I had assumed that as long as the levels of indirection were the same (e.g. <code>char*** ptr</code> and <code>char[][][] carray</code> ) the types were interchangeable.</p>
  
  <p>Can someone provide a reference I can review that clarifies these issues?</p>
  
  <p>Thanks.</p>