大家好,我的 C 语言有问题,我无法解决,这是我的代码:
void demande_usine_stockage(entrepot *u_s,fournisseur f[],int *demande,delai_appro &d_a,delai_ass &d_ass,usine_ass *u_a,int *attente_stockage,int *attente_assemblage,int *debut_stockage,int *fin_stockage,int *debut_assemblage,int *fin_assemblage,int periode)
{
u_a->commande_en_souffrance += *demande;
u_a->niveau_stock=u_a->stock_physique - u_a->commande_en_souffrance;
if (u_a->niveau_stock >= *demande)
{
*debut_stockage=periode;
*fin_stockage=periode+u_a->L_assemblage;
stockage(u_s,demande,d_a,u_a,debut_stockage,fin_stockage,attente_stockage,periode);
}
else
{
*debut_stockage=periode+f[1].L;
*fin_stockage=(periode+u_a->L_assemblage+f[1].L);
stockage(u_s,demande,d_a,u_a,debut_stockage,fin_stockage,attente_stockage,periode);
demande_usine_assemblage(f,u_a,d_ass,demande,attente_assemblage,debut_assemblage,fin_assemblage,periode);
}
}
并且 délai_ass 是一个链表
,这是错误
430 G:\test1.cpp invalid initialization of reference of type 'delai_assemblage*&' from expression of type 'delai_assemblage'