1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
| int TableauDynamique_struct_ajouter(struct TableauDynamique_struct *pThis, struct BiSequence const* pcNouveau)
{
assert(pThis->taille <= pThis->capacite);
/* Agrandir le tableau si besoin est. */
if(pThis->taille == pThis->capacite)
{
size_t nouvelleCapacite = (pThis->capacite < 4 ? 4 : (size_t)(pThis->capacite*1.5));
if(realloc_struct(&pThis->tab, nouvelleCapacite) >= 0)
{
pThis->capacite = nouvelleCapacite;
}
else
return -1;
}
pThis->tab[pThis->taille++] = *pcNouveau;
} |
Au niveau de la derniere instruction j'ai une erreur de type
|erreur: incompatible types in assignment
et là :
if(realloc_struct(&pThis->tab, nouvelleCapacite) >= 0)
attention : passing argument 1 of ‘realloc_struct’ from incompatible pointer type|
Une idée svp?
merci
Partager