C++ operation overload, crash
<p>Why does this code crash the program when I run it</p>

<pre><code>ostream&amp; operator&lt;&lt;(ostream&amp; cout, Array&lt;int&gt; a) {

    return cout;
}
</code></pre>

<p>and this doesn't</p>

<pre><code>ostream&amp; operator&lt;&lt;(ostream&amp; cout, Array&lt;int&gt;&amp; a) {

    return cout;
}
</code></pre>
