main.c:78:25: erreur: assignment from incompatible pointer type [-Werror]
main.c:81:9: erreur: passing argument 2 of ‘matrix_multiply’ from incompatible pointer type
Change your struct
definition to this:
typedef struct matrix_t {
int **M;
int nLi;
int nCo;
struct matrix_t *next;
} matrix_t;
Notice the difference?
struct matrix_t
is not the same as typedef ... matrix_t
; they exist in different namespaces; so in your version of the code, the compiler assumes that struct matrix_t *next
refers to a different, incomplete type.