Я новичок в C, и я должен сделать программу для школы.
У меня есть 3 класса:
lab11.c (основной)
procs.c
procs.h
Я получаю эту ошибку каждый раз:
error: conflicting types for 'transposarMatriu'|
\procs.h|171|note: previous declaration of 'transposarMatriu' was here|
Мой код (основной):
char matriu_ori[T_DIM_MAX][T_DIM_MAX];
char matriu_dst[T_DIM_MAX][T_DIM_MAX]
transposarMatriu(matriu_ori, *matriu_dst, mida, mida);
Procs.h
extern void transposarMatriu(char matriu_ori[][T_DIM_MAX], char matriu_dst[][T_DIM_MAX], int nfiles, int ncols);
Procs.c
void transposarMatriu(char matriu_ori[][T_DIM_MAX], char *matriu_dst[][T_DIM_MAX], int nfiles, int ncols) {
int c,d;
for (c = 0; c < nfiles; c++) {
for( d = 0 ; d < ncols ; d++ ) {
*matriu_dst[d][c] = matriu_ori[c][d];
}
}
}