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. Debug CArray

Debug CArray

Scheduled Pinned Locked Moved C / C++ / MFC
c++debuggingquestion
5 Posts 5 Posters 1 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
    David Carkeet
    wrote on last edited by
    #1

    Call be a fool and laugh, if y want, but is there a simple way that I can see the elements of a CArray in the MSC++ de bugger? Ta Dave.

    C M 2 Replies Last reply
    0
    • D David Carkeet

      Call be a fool and laugh, if y want, but is there a simple way that I can see the elements of a CArray in the MSC++ de bugger? Ta Dave.

      C Offline
      C Offline
      Christian Graus
      wrote on last edited by
      #2

      If it's anything like a vector, you should be able to drop down the element and get the memory address of your data at least. Then if it's text you can use the memory viewer. I'll add my obligatory comment on CArray - it's a pile of crap. Consider using std::vector instead. Christian We're just observing the seasonal migration from VB to VC. Most of these birds will be killed by predators or will die of hunger. Only the best will survive - Tomasz Sowinski 29-07-2002 ( on the number of newbie posters in the VC forum ) Cats, and most other animals apart from mad cows can write fully functional vb code. - Simon Walton - 6-Aug-2002

      N 1 Reply Last reply
      0
      • D David Carkeet

        Call be a fool and laugh, if y want, but is there a simple way that I can see the elements of a CArray in the MSC++ de bugger? Ta Dave.

        M Offline
        M Offline
        Martin Marvinski
        wrote on last edited by
        #3

        David Carkeet wrote: Call be a fool and laugh, if y want, but is there a simple way that I can see the elements of a CArray in the MSC++ de bugger? Yes there is. :) In the "Watch" window(if you don't see it just right click in the debugger and it will bring up the option), type the name of the array and all the values will be listed. What I do is insert a breakpoint at the place after the array is filled and then start the debugger. Once you have reached the breakpoint type the array's name in the "Watch" window and then presto, your elements will be listed. Hope that helps.

        G 1 Reply Last reply
        0
        • M Martin Marvinski

          David Carkeet wrote: Call be a fool and laugh, if y want, but is there a simple way that I can see the elements of a CArray in the MSC++ de bugger? Yes there is. :) In the "Watch" window(if you don't see it just right click in the debugger and it will bring up the option), type the name of the array and all the values will be listed. What I do is insert a breakpoint at the place after the array is filled and then start the debugger. Once you have reached the breakpoint type the array's name in the "Watch" window and then presto, your elements will be listed. Hope that helps.

          G Offline
          G Offline
          Gary R Wheeler
          wrote on last edited by
          #4

          Well, teach a mangy old dog new tricks. I didn't know the Watch window was that smart! Thanks!:-O:-O:-O:-O Gary R. Wheeler

          1 Reply Last reply
          0
          • C Christian Graus

            If it's anything like a vector, you should be able to drop down the element and get the memory address of your data at least. Then if it's text you can use the memory viewer. I'll add my obligatory comment on CArray - it's a pile of crap. Consider using std::vector instead. Christian We're just observing the seasonal migration from VB to VC. Most of these birds will be killed by predators or will die of hunger. Only the best will survive - Tomasz Sowinski 29-07-2002 ( on the number of newbie posters in the VC forum ) Cats, and most other animals apart from mad cows can write fully functional vb code. - Simon Walton - 6-Aug-2002

            N Offline
            N Offline
            NormDroid
            wrote on last edited by
            #5

            and I'll second that, usedthe std container classes vector/list/map etc. free of charge as well i might add. Normski. - the next bit of code is self modifying ... jmp 0xCODE

            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