Class Template Specialisation, C++, mismatch at argument 2 in template parameter list
<p>I have a template:</p>

<pre><code>template &lt;typename T, int size&gt;
class Array
{

    T A[size];

public:

    T&amp; operator[](int index) ;

};

template &lt;typename T, int size&gt;
T&amp; Array&lt;T,size&gt;::operator[](int index)
{
    if (index&gt;=size || index&lt;0)
        return A[0];
    else
        return A[index];
}
</code></pre>

<p>And its specialisation class:</p>

<pre><code>typedef struct Data
{
    int id;
    char name[10];
    double temp;
    double quantity;
}Data;

template &lt;&gt;
class Array&lt;Data, int&gt;
{
};
</code></pre>

<p>And I try to use it:</p>

<pre><code>int main()
{
    Array&lt;Data, int&gt; tab;
    return 0;

}
</code></pre>

<p>But I'm getting this error, and dont really know why:</p>

<blockquote>
  <p>error: type/value mismatch at argument 2 in template parameter list
  for ‘template class Array’|</p>
</blockquote>

<p>What's wrong?</p>

<p>Its strange. I changed the code to the following one:</p>

<pre><code>template &lt;&gt;
class Array&lt;Data, 20&gt;
{
};

int main()
{
    Array&lt;Data, 20&gt; tab;
    return 0;
}
</code></pre>

<p>And its ok now. Thanks!</p>