Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Reg. Structure variable [modified]

Reg. Structure variable [modified]

Scheduled Pinned Locked Moved C / C++ / MFC
question
4 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    rajaratk
    wrote on last edited by
    #1

    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

    N 1 Reply Last reply
    0
    • R rajaratk

      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

      N Offline
      N Offline
      Nishad S
      wrote on last edited by
      #2

      rajaratk wrote:

      C_Subscriber subdeviceSubs = *lpSubscr;

      What is this lpSubscr?

      - NS -

      R 1 Reply Last reply
      0
      • N Nishad S

        rajaratk wrote:

        C_Subscriber subdeviceSubs = *lpSubscr;

        What is this lpSubscr?

        - NS -

        R Offline
        R Offline
        rajaratk
        wrote on last edited by
        #3

        Instance of typedef struct user far *LPUSER;

        N 1 Reply Last reply
        0
        • R rajaratk

          Instance of typedef struct user far *LPUSER;

          N Offline
          N Offline
          Nishad S
          wrote on last edited by
          #4

          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 -

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups