0
Can i used 3D array in C++?
9 Antworten
+ 3
like that?
int arr [3] [3] [2];
for (int i=0;i<3:i++)
for (int j=0;j<3;j++)
for (int k=0;k<2;k++)
cin>>arr[i] [j] [k] ;
+ 2
Yes you can do that. Your primary target to accomplish printing or working in 3D array is using for loops. Nesting your for loops.
+ 2
yahya sh , you are correct with that but bear in mind that you need to initialize your arrays before working with it.
+ 1
just i want to learn how can i do that? 😁 thanks
+ 1
thanks my friend 🌹
0
For example?
int arr [3] [3] [2] ;