Hi,

I have a structure as
Code:
 
struct S1ap_SetUpRequest:public  S1ap_MessageType
{
         bool SupportedTAsPresence;
         unsigned int SupportedTAsCount ;
         //and many other members
 };
S1ap_MessageType is my Base message
struct S1ap_MessageType
{
S1ap_ProcedureCode_Enum Procedure_Code;
S1ap_MessageType_Enum Type_of_Message;
};


if I declare a pointer to struct S1ap_SetUpRequest and try to access its members using pointer,
Some wierd memory corruption is observed,where the address of members of structure changes.

say for eg:
S1ap_SetUpRequest * ptr = new S1ap_SetUpRequest ;

address of (ptr->SupportedTAsPresence) at the time of creation is 8276655

Later on as the code executes
address of (ptr->SupportedTAsPresence) at the time of creation is 8276658

Is this possible ?

Last edited by shabbir; 19Jul2011 at 21:18.. Reason: Code blocks