C Board  

Go Back   C Board > General Programming Boards > C++ Programming

Reply
 
LinkBack Thread Tools Display Modes
Old 11-10-2009, 05:21 AM   #1
Registered User
 
rogster001's Avatar
 
Join Date: Aug 2006
Location: Liverpool UK
Posts: 241
Debugger : watching data members or arrays

I always find it hit and miss adding watches that work when they are in arrays and or array members of classes, sometimes the debugger obliges and gives me an expandable tree showing changes to all the data members but sometimes it says they are not in current context, also with arrays it is same, especially 2d arrays. I dont know what to tell it to watch for example when i want to see the changes to the integer 'areatype' below >

Code:
solpeg[dwn][acr].areatype
if this is in a loop counting through all the down and across values and accessing each < object[n][n].datamember > as it goes how can i watch the data members that are being referenced on each loop? I have tried using 'watch as array' but it doesnt seem to make much difference in my attempts so far.

I am using CODE::BLOCKS by the way

Last edited by rogster001; 11-10-2009 at 05:27 AM. Reason: advise IDE
rogster001 is offline   Reply With Quote
Old 11-10-2009, 05:24 AM   #2
Registered User
 
Join Date: Oct 2009
Location: While(1)
Posts: 316
If you are working on Visual Studio then it will be there, i don't know why it is not coming in studio try to install visual assistance then it will be more helpful though
RockyMarrone is offline   Reply With Quote
Old 11-10-2009, 07:02 AM   #3
Registered User
 
rogster001's Avatar
 
Join Date: Aug 2006
Location: Liverpool UK
Posts: 241
i see now that i cannot see changes being made when the array is passed to a function, it is like dynamic changes cannot be seen, when i follow the flow back to where the object was declared the changes can be seen and i can expand said tree.

Last edited by rogster001; 11-10-2009 at 07:03 AM. Reason: i wonder if i could have got the words 'see' and seen' in a few dozen more times there...
rogster001 is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
data structure design for data aggregation George2 C# Programming 0 05-20-2008 06:43 AM
Save data from two struct arrays in one .dat file IndioDoido C Programming 5 03-27-2008 03:50 PM
Bitmasking Problem mike_g C++ Programming 13 11-08-2007 12:24 AM
Accessing private data members maloy C++ Programming 11 10-04-2002 02:48 PM
static and non-static data members Unregistered C++ Programming 2 06-16-2002 10:06 AM


All times are GMT -6. The time now is 03:39 PM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.0 RC2

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22