Init Array of vector.size() in c++ : <p>I try to compile some c++-Code from the internet 
(<a href="http://arma.sourceforge.net/shadows/" rel="nofollow">http://arma.sourceforge.net/shadows/</a>).</p>

<p>When compiling the code I get an error for initializing arrays.
Example (from the code-> GaussianMixtureModel.cpp Line:122):</p>

<pre><code>void function()
{
  int k = Vector.size();
  uchar* Ptrs[k];
  // Does somthing with the Ptrs
}
</code></pre>

<p>I also tried to edit it to the following:</p>

<pre><code>const int k = Vector.size();
</code></pre>

<p>But it didn't work. I would appreciate any help!</p>

<p>I'm using Visual Studio 2012.</p>

<p>Thanks for your answers!</p>
