title: Using sizeof() to determine ArraySize
body: <p>I am trying to implement a function that takes an array, calculates 1/X for each element, and returns the resulting array.</p>
  <p>However, I have an issue when trying to determine the size of each array. <code>sizeof(X) / sizeof(X[0])</code> does not correctly calculate the array size, and instead outputs 0.</p>
  <pre><code>double* MyFunction(double X[]) {
      std::cout &lt;&lt; &quot;arraySize of x: &quot; &lt;&lt; sizeof(X) / sizeof(X[0]);
      double A[100] = {};
      for (int i = 0; i &lt; sizeof(X) / sizeof(X[0]); ++i) {
          A[i] = 1 / X[i];
      }
      return A;
  }
  </code></pre>
  <p>What am I doing wrong?</p>