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. Print class Members?

Print class Members?

Scheduled Pinned Locked Moved C / C++ / MFC
8 Posts 4 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.
  • B Offline
    B Offline
    bosfan
    wrote on last edited by
    #1

    Hi, is it possible to print class members, like in Visual Studio in the "Immediate Window", when i write a class name there is an output with all members/variables in the window? Is there an API for this? Thanks for help bosfan

    M D C 3 Replies Last reply
    0
    • B bosfan

      Hi, is it possible to print class members, like in Visual Studio in the "Immediate Window", when i write a class name there is an output with all members/variables in the window? Is there an API for this? Thanks for help bosfan

      M Offline
      M Offline
      Maximilien
      wrote on last edited by
      #2

      In the debugger or as a simple output (printf/cout) ?

      I'd rather be phishing!

      1 Reply Last reply
      0
      • B bosfan

        Hi, is it possible to print class members, like in Visual Studio in the "Immediate Window", when i write a class name there is an output with all members/variables in the window? Is there an API for this? Thanks for help bosfan

        D Offline
        D Offline
        David Crow
        wrote on last edited by
        #3

        Are you wanting reflection, like Java has?

        "One man's wage rise is another man's price increase." - Harold Wilson

        "Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons

        "You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles

        B 1 Reply Last reply
        0
        • B bosfan

          Hi, is it possible to print class members, like in Visual Studio in the "Immediate Window", when i write a class name there is an output with all members/variables in the window? Is there an API for this? Thanks for help bosfan

          C Offline
          C Offline
          CPallini
          wrote on last edited by
          #4

          Nope, you have to develop it yourself.

          B 1 Reply Last reply
          0
          • D David Crow

            Are you wanting reflection, like Java has?

            "One man's wage rise is another man's price increase." - Harold Wilson

            "Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons

            "You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles

            B Offline
            B Offline
            bosfan
            wrote on last edited by
            #5

            Hello, sorry to all because its late answer, yes reflections should be the solution. Thanks

            D 1 Reply Last reply
            0
            • C CPallini

              Nope, you have to develop it yourself.

              B Offline
              B Offline
              bosfan
              wrote on last edited by
              #6

              Hi, sorry ,i'm little late, thanks for answer. regards

              C 1 Reply Last reply
              0
              • B bosfan

                Hello, sorry to all because its late answer, yes reflections should be the solution. Thanks

                D Offline
                D Offline
                David Crow
                wrote on last edited by
                #7

                Such a thing does not exist, at least not directly, in C++.

                "One man's wage rise is another man's price increase." - Harold Wilson

                "Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons

                "You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles

                1 Reply Last reply
                0
                • B bosfan

                  Hi, sorry ,i'm little late, thanks for answer. regards

                  C Offline
                  C Offline
                  CPallini
                  wrote on last edited by
                  #8

                  You are welcome.

                  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