C | static | extern | const | define
Pourquoi l'élément n'est t-il pas une constante ? merci
Code:
1 2
| const unsigned int position_jeu_centree_X = (Largeur_Ecran_jeu_x-PLAY_WIDTH_SIZE)/2;
const unsigned int position_jeu_centree_Y = (Hauteur_Ecran_jeu_Y-PLAY_HEIGHT_SIZE)/2; |
messages d'erreurs :
Code:
1 2 3 4 5 6
| gcc -std=c99 -lglut -lGL -lGLU -lpng -Wall -g -c end_game.c -o end_game.o
end_game.c:22:45: error: initializer element is not constant
const unsigned int position_jeu_centree_X = (Largeur_Ecran_jeu_x-PLAY_WIDTH_SIZE)/2;
^
end_game.c:23:45: error: initializer element is not constant
const unsigned int position_jeu_centree_Y = (Hauteur_Ecran_jeu_Y-PLAY_HEIGHT_SIZE)/2; |