Click to See Complete Forum and Search --> : This is easy but I need help.


jplenhart
April 14th, 1999, 08:49 AM
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.

Franky Braem
April 14th, 1999, 09:46 AM
It declares a variable length array of the struct STYLES. The initialisation adds 3 elements to it.

eperales
April 14th, 1999, 09:53 AM
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!