title: C++ pointer to pointer of array
body: <p>how to pass array to this function ?</p>
  <p>this is the function :</p>
  <pre><code>void fire(const uint8_t *const s[])
  {
  cout&lt;&lt;*s&lt;&lt;endl;
  }
  </code></pre>
  <p>and I want to pass this array to that :</p>
  <pre><code>unsigned char X[10] = {255,255,255,255};
  </code></pre>
  <p>it is done by this and it works</p>
  <pre><code>unsigned char X[5] = {255,255,255,255};
  unsigned char *pointertoX ;
  pointertoX = X;
  fire(&amp;pointertoX);
  </code></pre>
  <p>why I need *pointertoX ?
  is there any other way for do this ?</p>
  <p>whole code :</p>
  <pre><code>#include &lt;iostream&gt;
  using namespace std;
  
  
  void fire(const uint8_t *const s[])
  {
  cout&lt;&lt;*s&lt;&lt;endl;
  }
  
  
  int main() {
  
  
  unsigned char X[10] = {255,255,255,255};
  unsigned char *pointertoX ;
  pointertoX = X;
  fire(&amp;pointertoX);
  
  
      return 0;
  }
  </code></pre>
  <p>note : I'm trying to pass bitmap to ffmpeg &quot;sws_scale&quot; ..</p>
  <p><a href="https://ffmpeg.org/doxygen/4.1/group__libsws.html#gae531c9754c9205d90ad6800015046d74" rel="nofollow noreferrer">https://ffmpeg.org/doxygen/4.1/group__libsws.html#gae531c9754c9205d90ad6800015046d74</a></p>