in void map::initializeMap(constint row, constint column) you declare your own array gamemap [row][column]. It differs from map::gamemap and after calling initializeMap object array doesn't change.
You may do the following modification:
1 2 3 4 5 6 7 8 9
void map::initializeMap(constint row, constint column)
{
// This does not work.
gamemap [row][column] =
{
{'X', ...}, {...}
};
this->gamemap = gamemap;
}
But honestly, I don't understand your logic properly.
Alright, you see how it's initialized as a private value of "char gamemap [rows][columns];", well that docent seem to work because it says rows and columns is not declared. I'm trying to make it where a user can input what they want as the size, then it will create the gamemap as that size. However, it seems like you have to put preset values such as gamemap[15][51]. Is there a way around this?
i KNOW an algorithm to generate the map.
Let me try to explain this further.
I have a text file that has a map like:
XXXXX
XX XX
xXXXX
xXXXX
I need my program to read the textfile and put it into the 2-dim char array. The problem is that I cannot initialize the private value of the gamemap[][] to 2 constant numbers becuase the map can be any number. Visual STUDIO is giving me an error that there has to be a number like gamemap[1][3] in order for it to work, but the map can be modified in the text file and then I need the new size to be the new 2-dim size.