C : Indirection non conforme et #define
Résolu
Gaston
-
Gaston -
Gaston -
Bonjour,
J'ai un code qui me parait simple, mais qui ne compile pas :
#define SIZE_BLOCK 20;
#define Nb_block_H 25;
int length;
length=SIZE_BLOCK*Nb_block_H;
L'erreur est une indirection non conforme (C2100) au niveau du calcul de "length".
Je ne comprend pas pourquoi, mais il semblerai que l'erreur provient de la multiplication.
Si quelqu'un connaît la solution à ce problème, je lui serait reconnaissant.
J'ai un code qui me parait simple, mais qui ne compile pas :
#define SIZE_BLOCK 20;
#define Nb_block_H 25;
int length;
length=SIZE_BLOCK*Nb_block_H;
L'erreur est une indirection non conforme (C2100) au niveau du calcul de "length".
Je ne comprend pas pourquoi, mais il semblerai que l'erreur provient de la multiplication.
Si quelqu'un connaît la solution à ce problème, je lui serait reconnaissant.