Reg. Structure variable [modified]
-
Hello, Good Day! Step 1: struct user { unsigned short us_nbs; unsigned short us_debit; unsigned short us_flowctrl; }; Step 2: In another header file contains this: "class C_User : public CObject, public user" Step 3: class C_Subscriber : public C_User Step 4: C_Subscriber subdeviceSubs = *lpSubscr; Step 5: I got that us_flowctrl value is "0" by executing this statement : subdeviceSubs.us_flowctrl. How? Thanks in advance Raja Ratheesh -- modified at 1:56 Friday 14th September, 2007
-
Hello, Good Day! Step 1: struct user { unsigned short us_nbs; unsigned short us_debit; unsigned short us_flowctrl; }; Step 2: In another header file contains this: "class C_User : public CObject, public user" Step 3: class C_Subscriber : public C_User Step 4: C_Subscriber subdeviceSubs = *lpSubscr; Step 5: I got that us_flowctrl value is "0" by executing this statement : subdeviceSubs.us_flowctrl. How? Thanks in advance Raja Ratheesh -- modified at 1:56 Friday 14th September, 2007
-
So you are getting values changed... class C_User : public CObject, public user class C_Subscriber : public C_User typedef struct user far *LPUSER C_Subscriber subdeviceSubs = *lpSubscr; So the C_Subscriber has CObject in the first memory area. I doubt that it could be the problem. Dont you get any compilation error by "C_Subscriber subdeviceSubs = *lpSubscr;" ?
- NS -