M
Mike Copeland
I'm trying to create a structure and populate it with default values.
Below is my attempt, but it fails (badly) to compile. What did I do
wrong here? How might I fix this? TIA
#define ERLIMIT 5
struct ERMENU
{
string title;
short xAxis, yAxis;
short titleLen, dataLen;
short linkPrior, linkNext;
short option;
WORD dispAttr;
short erHead, erTail, erCurrent;
} erMenu[ERLIMIT] =
{
{"category1", 2, 4, 9, 1, 0, 0, 0, LONORM, 0, 0, 0},
{"category2", 2, 5, 9, 1, 0, 0, 0, LONORM, 0, 0, 0},
{"category3", 2, 6, 9, 1, 0, 0, 0, LONORM, 0, 0, 0},
{"category4", 2, 7, 9, 1, 0, 0, 0, LONORM, 0, 0, 0},
{"category5", 2, 8, 9, 1, 0, 0, 0, LONORM, 0, 0, 0}
};
Below is my attempt, but it fails (badly) to compile. What did I do
wrong here? How might I fix this? TIA
#define ERLIMIT 5
struct ERMENU
{
string title;
short xAxis, yAxis;
short titleLen, dataLen;
short linkPrior, linkNext;
short option;
WORD dispAttr;
short erHead, erTail, erCurrent;
} erMenu[ERLIMIT] =
{
{"category1", 2, 4, 9, 1, 0, 0, 0, LONORM, 0, 0, 0},
{"category2", 2, 5, 9, 1, 0, 0, 0, LONORM, 0, 0, 0},
{"category3", 2, 6, 9, 1, 0, 0, 0, LONORM, 0, 0, 0},
{"category4", 2, 7, 9, 1, 0, 0, 0, LONORM, 0, 0, 0},
{"category5", 2, 8, 9, 1, 0, 0, 0, LONORM, 0, 0, 0}
};