1234567891011121314151617181920212223242526272829303132333435363738394041 |
- #include <iostream>
- #define TAILLE_X 6
- #define TAILLE_Y 4
- using namespace std;
- void presenterTableau(int tableauPtrCopie[TAILLE_Y][TAILLE_X]);
- int main()
- {
- cout << "Voici un tableau :" << endl;
- int tableauBiDimensions[TAILLE_Y][TAILLE_X] = { {1,2,1,5,4,9},
- {3,4,3,4,5,9},
- {9,9,9,9,9,9},
- {1,8,4,5,5,6}};
- for (int i(0); i<TAILLE_Y; i++)
- {
- for (int j(0); j<TAILLE_X; j++)
- {
- cout << tableauBiDimensions[i][j];
- }
- cout << endl;
- }
- presenterTableau(tableauBiDimensions);
- cout << &tableauBiDimensions << endl;
- return 0;
- }
- void presenterTableau(int tableauPtrCopie[TAILLE_Y][TAILLE_X])
- {
- for (int i(0); i<TAILLE_Y; i++)
- {
- for (int j(0); j<TAILLE_X; j++)
- {
- cout << tableauPtrCopie[i][j];
- }
- cout << endl;
- }
- }
|