Voila quand j'essaye de compilé sa me marque :
-structures.h:21: error: ‘TAILLE_LONGUEUR’ undeclared here (not in a function)
structures.h:21: error: ‘TAILLE_LARGEUR’ undeclared here (not in a function)
-structures.h:4:9: error: macro names must be identifiers
structures.h:5:9: error: macro names must be identifiers
structures.h
constanteMap.h
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20 #ifndef __STRUCTURES_JEU__ #define __STRUCTURES_JEU__ #define "constanteMap.h" #define "constanteVaisseau.h" struct _Avion{ int largeur; int longueur; }; typedef struct _Avion Vaisseau; struct _Terrain{ int mappy[TAILLE_LONGUEUR][TAILLE_LARGEUR]; }; typedef struct _Terrain Map; #endif
Voilà je sais pas ce qui se passe. Si vous pouvez m'aider se serai gentil. merci d'avance
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10 #ifndef __CONSTANTE_MAP_ #define __CONSTANTE_MAP_ #define TAILLE_LARGEUR 41 #define TAILLE_LONGUEUR 100 #define MAP_VIDE 0 #endif
Partager