Cannot allocate memory for a 2 dimentional array of pointers c++ -
so i'm trying create 2 dimensional array of pointers object of type piece. problem when try assign pointer piece array segmentation fault. realized needed initialize array sometime before can start allocating can't right. here header file of map contains 2-d array of pointers. #ifndef map_h #define map_h #include <iostream> #include <vector> #include <fstream> #include <stdio.h> #include <stdlib.h> #include <sstream> #include <string> #include <cstring> #include "player.h" #include "sprite.h" #include "piece.h" #include "messages.h" #include "piecetype.h" using namespace std; class map { private: piece*** pieces; int startingx; int startingy; int width; int height; string mapname; public: map(string); ~map(); void printmap() const; piece* piecetype(char); vo...