vector allocation error subscript to pointer to incomplete type : <p>i have my product</p>

<pre><code>typedef struct proditem *prodItem;
</code></pre>

<p>and i have a symbol table of products</p>

<pre><code>typedef struct tabp *tabP;
struct tabp {
    prodItem vettP;
    int nP;
};
</code></pre>

<p>i need to allocate in memory,
then :</p>

<pre><code>tab-&gt;nP = max; // quantity of products
tab-&gt;vettP = malloc(max * sizeof(*prodItem));
</code></pre>

<p>but if a try to use the vector tab->vettP have the error:</p>

<p><code>tab-&gt;vettP[i]</code> &lt;&lt;-- subscript to pointer to incomplete type</p>

<p>can anyone help me?</p>
