bsmanoj
April 7th, 1999, 07:25 AM
Hi all,
In my application I have a structure like this.
typedef struct
{
DWORD msgType;
PARAMS params;
}MSGQ;
typedef union //params
{
NEGOTIATE negotiate;
CLOSELINE lineClose;
LINEOPEN lineOpen;
.
.
//etc
} PARAMS;
typedef struct
{
DWORD lineAddrID;
int retVal;
int FSMState;
}LINEOPEN, CLOSELINE, NEGOTIATE;
But when I create an objec of my structure MSGQ
MSGQ msg;
while the debugger(VC++5.0) runs, I put a breakpoint and found the value of msg.params.lineOpen .... Surprisingly the member of the union name was shown as "lineOpenA" instead of "lineOpen".
and when the application exits it gives Unhandled exeption.
All other members of union PARAMS are displayed correctly in the watch window, except the member "lineOpen".
Can anybody tell me a way out.
thanks in advance.
bsmanoj
In my application I have a structure like this.
typedef struct
{
DWORD msgType;
PARAMS params;
}MSGQ;
typedef union //params
{
NEGOTIATE negotiate;
CLOSELINE lineClose;
LINEOPEN lineOpen;
.
.
//etc
} PARAMS;
typedef struct
{
DWORD lineAddrID;
int retVal;
int FSMState;
}LINEOPEN, CLOSELINE, NEGOTIATE;
But when I create an objec of my structure MSGQ
MSGQ msg;
while the debugger(VC++5.0) runs, I put a breakpoint and found the value of msg.params.lineOpen .... Surprisingly the member of the union name was shown as "lineOpenA" instead of "lineOpen".
and when the application exits it gives Unhandled exeption.
All other members of union PARAMS are displayed correctly in the watch window, except the member "lineOpen".
Can anybody tell me a way out.
thanks in advance.
bsmanoj