Referencing elements from two-dimensional array with a single value
<p>I am probably missing something fundamental, but i cannot find a solution to the following issue.
I have a two-dimensional array of some float elements and i am trying to find a way to be able to reference them by using only a single value.
Example:</p>

<pre><code>float test[5][50];
test[3][25] = 34.67;
cout &lt;&lt; test[3][25] &lt;&lt; endl;
int id = 25;
cout &lt;&lt; *test[id*5+3] &lt;&lt; endl;
</code></pre>

<p>I am hoping to get same result from both cout. Instead my output looks like this:</p>

<pre><code>34.67
Segmentation fault
</code></pre>

<p>What am I doing wrong?</p>

<p>Thanks!</p>
