
Envoyé par
gaut
je fais ce tableau:
1 2
|
int bouton[][]={{5,10,15,20},{25,30,35,40},{45,50,55,60},{65,70,75,80}}; |
et il me donne comme erreur :
12 bouton.cpp declaration of `bouton' as multidimensional array
66 main.c must have bounds for all dimensions except the first
66 main.c assignment (not initialization) in declaration
comment corriger ces erreurs??
Tout est dit :
il faut mettre :
int bouton[][4]={{5,10,15,20},{25,30,35,40},{45,50,55,60},{65,70,75,80}};
Et ce n'est pas un tableau à 4 dimensions mais à 2 dimensions.
4 dimensions, ça serait plutôt "bouton[][][][]" !
Partager