Nina Donath
July 29th, 2005, 11:07 AM
I have a C++ .NET project.
In a .h file I use for global #defines and definitions, I have the following:
typedef struct _mini
{
int iVal;
} miniStruct;
typedef struct _test
{
miniStruct mini[10];
} testStruct;
At the beginning of the Form Load function :
testStruct teststr;
teststr.mini[0].iVal = 11;
teststr.mini[1].iVal = 22;
Can someone tell me why the 2nd array value (i.e. teststr.mini[1].iVal) does not get assigned to 22? It is always 0. It is driving me crazy.
Thanks for any insight you can give,
nina
In a .h file I use for global #defines and definitions, I have the following:
typedef struct _mini
{
int iVal;
} miniStruct;
typedef struct _test
{
miniStruct mini[10];
} testStruct;
At the beginning of the Form Load function :
testStruct teststr;
teststr.mini[0].iVal = 11;
teststr.mini[1].iVal = 22;
Can someone tell me why the 2nd array value (i.e. teststr.mini[1].iVal) does not get assigned to 22? It is always 0. It is driving me crazy.
Thanks for any insight you can give,
nina