Converting some c++ array code to c#
<p>I'm having some trouble converting the following code from c++ to c# because of pointers.</p>

<p>Basically I have a </p>

<pre><code>STATE** State;
States = new STATE* [max_states];

for (int i=0; i &lt; max_states; i++) {
  States[i] = new STATE(max_symbols);
}
</code></pre>

<p>If this was some double array I would say</p>

<pre><code>STATE[][]  States;  
States = new STATE[max_states][];

for (int i = 0; i '&lt;' max_states; i++) {
    States[i] = new STATE[max_symbols];
}
</code></pre>

<p>But the problem is the c++ code is not working "as" I expected it to.</p>

<pre><code>States[i] = new STATE(max_symbols);
</code></pre>

<p>Has some strange behavior that for example allows</p>

<pre><code>States[cur_state]-&gt;set_recur_out(k);
</code></pre>

<p>what exactly am I not seeing? This might be a beginner c++ question. Sorry if I don't make any sense at all =)</p>
