Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

printing out returned values from mfunction calls in VC++ 6.0 debugger

Status
Not open for further replies.

damonh78

Programmer
Jul 28, 2005
44
IE
Hi,

When I am using the VC++ 6.0 debugger to look at certain objects how do i get print outs of the returned values from applying any of the objects member functions to that object. I have tried simply typing in the function call into the watch window, e.g. object->function() , but this doesnt seem to work.

Any help would be appreciated.

Thanks in advance,

John

 
I'm not quite sure what you mean?
If you have some code like this:
Code:
CObject obj;
long ret = obj.Function();  // Put a breakpoint here.
Once you execute obj.Function(), you can check the Locals window to see what value Function() returned, or check the value of ret.
 
hey,

sorry wasnt very clear I mean if an object is in scope, and you want to know what one of its functions returns at a certain moment in time, say a getter function on a private member variable, but that function isent called at that time. Using the unix debugger gdb you could just type print obj.Function() in the command box and it will return the value. Is there anyway of doing that in VC++ debugger?

John
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top