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. STL debugging in VC++6

STL debugging in VC++6

Scheduled Pinned Locked Moved C / C++ / MFC
c++graphicsdebuggingquestion
2 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.
  • I Offline
    I Offline
    Indrawati
    wrote on last edited by
    #1

    Hi Could someone tell me how I can debug STL types easily in VC++ 6? Everytime I use e.g. vector I can never see its content in the debug window. Thanks!

    D 1 Reply Last reply
    0
    • I Indrawati

      Hi Could someone tell me how I can debug STL types easily in VC++ 6? Everytime I use e.g. vector I can never see its content in the debug window. Thanks!

      D Offline
      D Offline
      Diddy
      wrote on last edited by
      #2

      Add this: std::basic_string<*>= std::vector<*>=size=, capacity= std::map<*>=size=<_Mysize, i> std::set<*>=size=<_Mysize, i> std::list<*>=size= std::deque<*>=size= std::pair<*>=first=, second= std::list<*>::iterator=val=<_Ptr->_Myval> std::list<*>::const_iterator=val=<_Ptr->_Myval> std::_Tree<*>::iterator=val=<_Ptr->_Myval> std::_Tree<*>::const_iterator=val=<_Ptr->_Myval> To VSDir\Common\MSDev98\Bin\Autoexp.dat That will give you some more info on the stl types. To actually see the contents of a vector, say called m_vec, you can actually take the address of the first element to be equal to the address of an standard C array stored in the vector - say &m_vec[0]; This is because STL gaurentees that the vector occupies contigous memory. If m_vec was a vector of ints (and your using STL port), you can do this: ((int*)&m_vec[0]), 100 to expand 100 elements in the vector in the watch window. Unfortunatly, standard stl wont let u call [] operator in the watch window. You can do ((int*)&(*m_vec.begin())), 100 If you can remeber all that lol

      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