Your code doesn't do what you think it does.
ArrayList[][] gridList = new ArrayList[300][150];
This first line allocates an array of array of ArrayList.
ArrayList al = this.gridList[a][b];
This second line retrieves the ArrayList at offset b in the array at offset a in the array gridList. You should be aware that your code doesn't initialize either arrays.
The equivalent type in C++ could be:
#include <vector>
#include <array>
std::array< std::array< std::vector<T>, 150>, 300> gridList;
where T is the type of the element stored in the vectors. Note that Java prior to generics only allowed to define ArrayList without specifying the element type, which is pretty much what your code does. In C++, this parameter is mandatory. The above variable definition will instantiate it for the current scope. you will need to use a new statement for a dynamic value (as in Java), and probably wrap it with a smart pointer.
To access an element of the grid, you can use the [] operator:
vector v = gridList[a][b];
Beware that this will trigger a full copy of the vector content in the grid at position < a,b > into v. As suggested, a more efficient way would be to write:
auto const &al = gridList[a][b];
Again, the memory model used by Java is very dynamic, so if you want code closer in behaviour to the Java version, you would probably have something like:
#include<memory>
typedef std::vector<int> i_vector;
typedef std::shared_ptr<i_vector> i_vector_ptr;
typedef std::array< std::array< i_vector_ptr>, 150>, 300> vector_grid;
typedef std::shared_ptr<vector_grid> vector_grid_ptr;
vector_grid_ptr gridList;
i_vector_ptr al = (*gridList)[a][b];
with type T being int, and each component of the grid type clearly defined. You still have to allocate the grid and each element (ie. i_vector here).
ArrayListto C++, or whatArrayList al = this.gridList[a][b];does?ArrayListclass to C++.