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. vc++ MFC

vc++ MFC

Scheduled Pinned Locked Moved C / C++ / MFC
c++helptutorial
3 Posts 3 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.
  • S Offline
    S Offline
    Selvan S
    wrote on last edited by
    #1

    Hai Dear; Can anyone tell me how to get a data or member variable value from one class to another class. Thanks for help. Regards, Selvan.S

    R 1 Reply Last reply
    0
    • S Selvan S

      Hai Dear; Can anyone tell me how to get a data or member variable value from one class to another class. Thanks for help. Regards, Selvan.S

      R Offline
      R Offline
      Rajesh R Subramanian
      wrote on last edited by
      #2

      Well, that's not a very good question, is it? Let's take two classes, A and B. Now B wants to make a query to A. So, A must implement a method, which in turn queries the value of the member variable and returns it. The answer is way too generic, because the question was generic too. If you show us some code on what and how are you trying to do something, we may guide you further. I am asking you to be a little more specific.

      Many are stubborn in pursuit of the path they have chosen, few in pursuit of the goal - Friedrich Nietzsche .·´¯`·->Rajesh<-·´¯`·. [Microsoft MVP - Visual C++]

      T 1 Reply Last reply
      0
      • R Rajesh R Subramanian

        Well, that's not a very good question, is it? Let's take two classes, A and B. Now B wants to make a query to A. So, A must implement a method, which in turn queries the value of the member variable and returns it. The answer is way too generic, because the question was generic too. If you show us some code on what and how are you trying to do something, we may guide you further. I am asking you to be a little more specific.

        Many are stubborn in pursuit of the path they have chosen, few in pursuit of the goal - Friedrich Nietzsche .·´¯`·->Rajesh<-·´¯`·. [Microsoft MVP - Visual C++]

        T Offline
        T Offline
        ThatsAlok
        wrote on last edited by
        #3

        humm global variable should be automatic advice for beginners :)

        "Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
        Never mind - my own stupidity is the source of every "problem" - Mixture

        cheers, Alok Gupta VC Forum Q&A :- I/IV Support CRY- Child Relief and You/xml>

        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