Probleme entre macro , global et define
Bonjour, J'ai un petit probleme de compilation.
En effet j'ai un .h :
Code:
# define COLUMN(COLUMN, X) (COLUMN) + X
Puis j'ai un second appel a un .h ou il y a un tableau :
Code:
1 2
| # define CHECK_SIZE {COLUMN, "COL"}, \
{0, NULL} |
Code:
1 2 3 4 5
| typedef struct s_check
{
int id;
char *str;
} t_check; |
Dans mon .c je fais un :
Code:
1 2 3
| t_check_value tab[] = {CHECK_SIZE};
res = tab[i].id(12, 12); |
Bien entendu il me dit qu'il ne connait pas ma macro ...
Quelqu'un aurrait une idee?
Merci beaucoup et bonne journee:P