+ 1

Help on Multi Dimensional array in c++

I dont understand Multi Dimensional array in c++ can any help example : int x [2][3]={{2,3,4}, {8,9,10}}; cout << x [2][2] << endl; output : 2686816 How it works? ???!!

12th Jan 2017, 12:56 AM
Wesam Fathy Mahmoud
Wesam Fathy Mahmoud - avatar
2 Antworten
+ 4
arrays start at 0 when referencing them.
12th Jan 2017, 7:03 AM
jay
jay - avatar
+ 4
there is not data at [2][2].. well nothing you placed there.
12th Jan 2017, 7:05 AM
jay
jay - avatar