Practice with templates returning error
<p>The code is working in that it <code>couts</code> <code>haha</code> but it causes an error because it says:</p>

<p><code>Process returned -1073741819 &lt;0xC0000005&gt;</code></p>

<p>And a window pops up telling me if I would like to send an error message. Why is this?</p>

<pre><code>#include &lt;iostream&gt;

using namespace std;

template &lt;class A&gt;

    A print( A a ) {
        cout &lt;&lt; a;
    }

template &lt;class T&gt;

    class David {
        T a;
        public:
            David( T something ) : a( something ) {}
            void laugh() {
                print(a);
            }
    };

int main() {

    David &lt;string&gt; Do("Hahaha");

    Do.laugh();

}
</code></pre>
