scusate la domanda idiota, ma come si stampa a video il contenuto di un array bidimensionale?? tipo
int e[7][7]
e[3][3] = 1
printf("%i",e[3][3]) non va, dove sbaglio? grazie
scusate la domanda idiota, ma come si stampa a video il contenuto di un array bidimensionale?? tipo
int e[7][7]
e[3][3] = 1
printf("%i",e[3][3]) non va, dove sbaglio? grazie
:master:
per gli interi si usa %d
Live fast. Troll hard.
Pythonist | Djangonaut | Puppeteer | DevOps | OpenStacker | Lost in malloc
Team Lead @Gameloft Barcelona
sisi scusa avevo messo dsolo che mi dice
undefined reference to printf
int e[7][7];
codice:void imprEch() { int i,j; j=5; i=0; while (i>=0) { pritnf("%d",e[i][j]); j++; }//end while }
ndo sbaglio?![]()
![]()
![]()
hai incluso l'header stdio.h ?
Drug misuse is not a disease, it is a decision, like the decision to step out in front of a moving car. [...] In this particular life-style the motto is "be happy now because tomorrow you are dying", but the dying begins almost at once, and the happiness is a memory.
scusate ma voi come printate un array bidimensionale?
in c++![]()
int e[2][2];
cout << e[1][0];
![]()
Matteo
Cosi nn crei un ciclo infinito? La i nn avanza maiOriginariamente inviato da vAiO
i=0;
while (i>=0){
pritnf("%d",e[i][j]);
j++;
}
codice:void main(){ int array[10][10], i, j; for(i = 0; i < 10; i++){ for(j = 0; j < 10; j++) array[i][j] = i + j; } for(i = 0; i < 10; i++){ for(j = 0; j < 10; j++) printf("%d ", array[i][j]); } }![]()
Live fast. Troll hard.
Pythonist | Djangonaut | Puppeteer | DevOps | OpenStacker | Lost in malloc
Team Lead @Gameloft Barcelona