Hi there
I've just started learning 2d arrays and I'm trying to assign
the 2nd vertical element and the 4th horizontal element
with values but it only assigns and displays the 2nd vertical
element (you know the first dimension):
// 2 dimensional arrays
#include <iostream>
using namespace std;
I think you lack basic knowledge of what a multi-dimensional array is. A 3 by 5 array of integers only stores 15 integers (3*5), in 3 rows and 5 columns. Each element does not store multiple integers.