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. ATL / WTL / STL
  4. how des "GetSize().foo = NULL" work

how des "GetSize().foo = NULL" work

Scheduled Pinned Locked Moved ATL / WTL / STL
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.
  • D Offline
    D Offline
    dcudev lcr
    wrote on last edited by
    #1

    Can somebody explain the following construct and when would you use it? GetSize().foo = NULL; thanks... Happy New Year... sun.lcr

    J 1 Reply Last reply
    0
    • D dcudev lcr

      Can somebody explain the following construct and when would you use it? GetSize().foo = NULL; thanks... Happy New Year... sun.lcr

      J Offline
      J Offline
      Jorgen Sigvardsson
      wrote on last edited by
      #2

      When GetSize() returns a reference to an object, and .foo is a pointer? -- Weiter, weiter, ins verderben. Wir müssen leben bis wir sterben. I blog too now[^]

      D 1 Reply Last reply
      0
      • J Jorgen Sigvardsson

        When GetSize() returns a reference to an object, and .foo is a pointer? -- Weiter, weiter, ins verderben. Wir müssen leben bis wir sterben. I blog too now[^]

        D Offline
        D Offline
        dcudev lcr
        wrote on last edited by
        #3

        Thank your Jorgen, Could you show me a sample of how you would set that in a class and its use... Thanks again... Happy New Year... :) sun.lcr

        J 1 Reply Last reply
        0
        • D dcudev lcr

          Thank your Jorgen, Could you show me a sample of how you would set that in a class and its use... Thanks again... Happy New Year... :) sun.lcr

          J Offline
          J Offline
          Jorgen Sigvardsson
          wrote on last edited by
          #4

          struct Y {
          void* foo;
          };

          class X {
          Y obj;

          public:
          Y& GetX();
          };

          X x;
          x.GetX().foo = NULL;

          -- I got nasty habits. I take tea at three.    -- Mick Jagger I blog too now[^]

          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