Well, that's certainly thinking outside of the box. But I'd be surprised if
it compiles.
As for why I want this: I have a structure that is used to pass data into
my public API:
struct MyStates {
BOOL X_Axis_Enabled;
BOOL Y_Axis_Enabled;
BOOL Z_Axis_Enabled;
}
Now, I've decided that it would be very convenient for me to be able to
access the members of this structure as though they were members of an
array, like this:
struct MyStates {
BOOL Enabled[3];
}
But I can't change the structure in a way that will break existing code that
accesses the individual member variables.
- Bob
"Peter Oliphant" <po*******@roundtripllc.comwrote in message
news:%2******************@TK2MSFTNGP03.phx.gbl...
How about just including this somewhere:
#define myStruct.Var1 myStruct.Var[1]
To be honest, not sure if the above works, and it is a purely syntactical
solution, and may not address the reasons WHY you want this capability.
[==Peter==]