title: C++ what if I don't know array size and need to receive an array
body: <p>I have a function like:</p>
  
  <pre><code>function(double* numbers)
  </code></pre>
  
  <p>I know that if I know the size of the numbers array, I can then do</p>
  
  <pre><code>double* numbers = new double[size];
  function(numbers)
  </code></pre>
  
  <p>This will return the value in <code>numbers</code> correctly, however, now I don't know the size of <code>numbers</code>, I still want to use function <code>function</code>, which is a third party library function which I don't want to change, is there a way to get the array out without knowing the size of array?</p>