This is easy but I need help.
I am reviewing an MFC program and one of the functions has this struct in it:
static struct STYLES styles[] = {
PS_SOLID, "PS_SOLID",
PS_DASH, "PS_DASH",
PS_DOT, "PS_DOT",
(then it has some more etc....)
};
I understand the PS's and text but the whole "styles[]" has me at a loss.
Any help is greatly appreciated.
Re: This is easy but I need help.
It declares a variable length array of the struct STYLES. The initialisation adds 3 elements to it.
Re: This is easy but I need help.
that only means that the styles array will have as many members as you initialize. In your example it means styles has a size of 3.
adiós!