//list.h file
typedef struct _lnode{
struct _lnode *next;
size_t row;
size_t column;
short data;
}lnode;
typedef struct _llist{
struct _lnode *head;
size_t size;
}llist;
//matrix.h file
typedef struct _matrix{
size_t width;
size_t height;
size_t k;
int **data;
}matrix;
//smatrix.h file
#include "list.h"
#include "matrix.h"
typedef struct _smatrix{
size_t width;
size_t height;
size_t k;
llist data;
}smatrix;
smatrix* make_smatrix(matrix *m);
El archivo smatrix.h incluye el archivo list.h y los archivos matrix.h. Si incluyo los archivos de cabecera de archivo smatrix.h entonces consigoErrores de redefinición en archivos .h
redefinition of 'lnode'. redefinition of '_llist' and redefinition of '_matrix' errors.
Si los archivos Tomé heder nuestro archivo de smatrix.h luego fue el error de distancia, pero se queja de tipo de matriz en el parámetro de la función. Quiero llamar a las funciones definidas en los archivos list.h y matrix.h en el archivo smatrix.c .. ¿Qué debo hacer? Gracias de antemano ..
_list.h_ como esta? – codereviewanskquestions
@LCYSoft Editado –
¡Gracias a un loooot! – codereviewanskquestions