So this is my class
class Map {
Field*** f;
int rows;
int columns;
};
How can I make a matrix of pointers to the class Field? I tried this but it doesnt work.
Map(int rows_, int columns_) : rows(rows_), columns(columns_) {
f = new Field*[][];
*f = new Field*[rows];
for (int i = 0; i < rows; i++) {
*f[i] = new Field[columns];
}
}