My friend and I are making a game, which is based on a tile engine we are making. The map is loaded into an array of integers to represent each different tile. However, in the map class, we need the variable
data to hold the integer array so we can access it like this:
MAP level1; x = level1.data;. The problem is that we can't make the int array until we know the size (no vector replies please). The size is stored in
level1.size during the function
MAP::Load(). Can we do one of the following:
MAP::Load()function, BUT have it public, so it can be accessed from outside using
datain the public section of the
MAPclass, then make the function
MAP::Load()return the 2D int array to it.
- Do something else without vectors to the same effect.