Alright I was wondering how do you use nested structures...
Code:
//This is the struct for our CHARACTER abilities and what not
struct CHARACTER
{
COORD pos; //Coordinates of the position of our CHARACTER
unsigned char dispChar; // The ASCII representation of the CHARACTER
unsigned char color; // The color (background and foreground) of the CHARACTER
int current_water; //This is a representation of how much water is contained
int water_need; //this tells us how much is needed
//when current_water reaches with in a few points of water_need then the thirsty will
//be defined as 'true'
bool thristy; //This defines the switch over from want to need
struct MEMORY
{
int size_of_memory;
COORD water_local;
};
};
How would I define anything within the memory struct? And how would I use it in a vector?
ie
CHARACTER Adam;
CHARACTER MEMORY mAdam;
Adam.mAdam.water_local....?
I just dont know how to do it...
Because I would like to access the variables in the memory struct with the character struct, but also I would like to occassionally just access the Memory struct.
Should I maybe just try something else?