1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
|
typedef int *mat_dyn; //tableau d'entier
/****************************************************************/
//initialisation de la matricre
void ini_matrice(mat_dyn *matrice,int ligne,int colonne)
{
int i,j;
*matrice=alloc_mrd(ligne,colonne);
if(*matrice==NULL)
{
printf("pas assez de memoire disponible\n");
exit(1);
}
for(i=0;i<ligne;i++)
for(j=0;j<colonne;j++)
(*matrice)[adr_mrd(i,j,colonne)]=0;
}
int main(void)
{
mat_dyn Mdepart;
ini_matrice(&Mdepart,ligne,var);
return 0;
} |