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. debugging issues

debugging issues

Scheduled Pinned Locked Moved C / C++ / MFC
questiongraphicsdata-structuresdebugging
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.
  • R Offline
    R Offline
    Rajveer
    wrote on last edited by
    #1

    My program shuts down at the same point always and when I debug it takes me to this statement in my program: vectorB = sqrt(xcoord1[n][layer]*xcoord1[n][layer] + ycoord1[n][layer]*ycoord1[n][layer]); in the variables window I see that vector B is 1.#INF000000000 so I'm trying to look at the values for my 2 dimensional arrays with the watch window. How can I look at the entire array...I know I can look at individual elements by typing xcoord1[34][3] or something like that? But I need to see all the elements. What do I type for this?

    A M 2 Replies Last reply
    0
    • R Rajveer

      My program shuts down at the same point always and when I debug it takes me to this statement in my program: vectorB = sqrt(xcoord1[n][layer]*xcoord1[n][layer] + ycoord1[n][layer]*ycoord1[n][layer]); in the variables window I see that vector B is 1.#INF000000000 so I'm trying to look at the values for my 2 dimensional arrays with the watch window. How can I look at the entire array...I know I can look at individual elements by typing xcoord1[34][3] or something like that? But I need to see all the elements. What do I type for this?

      A Offline
      A Offline
      Anders Molin
      wrote on last edited by
      #2

      Try to type xcoord1,10 instaed of xcoord1[34][3] in the watch window, then you can see the first 10 values of xcoord. Not exactly what you wanted, but it might help... - Anders Money talks, but all mine ever says is "Goodbye!"

      1 Reply Last reply
      0
      • R Rajveer

        My program shuts down at the same point always and when I debug it takes me to this statement in my program: vectorB = sqrt(xcoord1[n][layer]*xcoord1[n][layer] + ycoord1[n][layer]*ycoord1[n][layer]); in the variables window I see that vector B is 1.#INF000000000 so I'm trying to look at the values for my 2 dimensional arrays with the watch window. How can I look at the entire array...I know I can look at individual elements by typing xcoord1[34][3] or something like that? But I need to see all the elements. What do I type for this?

        M Offline
        M Offline
        Michael P Butler
        wrote on last edited by
        #3

        I find the easiest way is to use the TRACE macro and loop through the values in the array. Its a little bit of an old fashioned debugging technique but I've always found trying to view arrays in the debugger as rather hard work. Michael :-) Communication is the first step towards enlightenment.

        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