title: Passing three dimensional array by reference in c++
body: <p>Function is defined as:    </p>
  
  <pre><code>int strip(double *signalstnV){
  .
  .
  return 0;
  }
  </code></pre>
  
  <p>And main function it is called as:</p>
  
  <pre><code>main{
  .
  .
  double signalstnV[iteration][2*range+1][3];
  .
  .
  check = strip(signalstnV);
  .
  }
  </code></pre>
  
  <p>I wanted to use the array in next function in main after it is modified in strip function. But during compilation i am getting an error as following</p>
  
  <p>sim.C: In function ‘int main(int, char**)’:</p>
  
  <p>sim.C:54:26: error: cannot convert ‘double (<em>)[151][3]’ to ‘double</em>’ for argument ‘1’ to ‘int strip(double*)’</p>
  
  <p>check = strip(signalstnV);</p>
  
  <p>I am not able to understand it. Please help.
  My main goal is to generate array from strip function and pass it to other functions later in code.</p>
  
  <p>Also when i used this array in another function </p>
  
  <pre><code>threshold(double * signalstnV)
  </code></pre>
  
  <p>and using a for loop to extract some specific values, it gives error as: </p>
  
  <pre><code>invalid types ‘double[int]’ for array subscript 
  if (signalstnV[k][j][3] &lt; -0.015){
  ..}
  </code></pre>