I'm having abit of a problem having a reference to a parent classes data member, the trouble is passing the variable in the class definition. I'm really unsure how to do this.
Class header code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
class eMap
{
public:
unsignedshort width;
class Tiles
{
public:
Tiles_T grid;
unsignedshort& width;
unsignedchar depths;
unsignedint count;
Tiles(unsignedshort&);
} tiles(width); //Problem lies here
};