c++ program stops without errors warnings when printing matrix
<p>I can't seem to find any solution for this.</p>

<p>I have a type 'route' that contains a matrix.if I do:</p>

<pre><code>cout &lt;&lt; route &lt;&lt; endl;
</code></pre>

<p>it works it prints the memory
but if I try</p>

<pre><code> cout &lt;&lt; route[1][1] &lt;&lt; endl;
</code></pre>

<p>program just ends without any error or anything.
debug says:
"(Suspended : Signal : SIGSEGV:Segmentation fault)"</p>

<p>here is the code:</p>

<pre><code>//structure is a type I created
Structure ***route = list-&gt;searchRoute(startPoint, destination, time);
//should return a matrix
cout &lt;&lt; "Avaible routes: \n" &lt;&lt; endl;
    for(int i = 0; i &lt; 5;i++)
        cout &lt;&lt; route[1][1]-&gt;startPoint &lt;&lt; endl;
</code></pre>
