Template - class that uses int, short or float when necessary
<p>I want to write a class that manages euclidean vector and that store its initial point using short, int, long or float. I thought to create a template like this:</p>

<pre><code>    template&lt;class unit&gt; class EVector
{
private:
    unit x;
    unit y;
public:
    EVector();
    setX();
    setY();
};
</code></pre>

<p>So user creates an EVector choosing the suitable primitive type. But how can I implement the operation between different classes, e.g.</p>

<pre><code>EVector&lt;int&gt; a;
EVector&lt;float&gt; b;

EVector&lt;double&gt; c;

c = a + b;  
</code></pre>

<p>operator= will copy the coordinates,  operator+ adds them. </p>
