Help: damn vectors won't show up in watch window 
Author Message
 Help: damn vectors won't show up in watch window

Hi, I'm using MSVC6.
I'm running in debug mode, and I want to look at the value of an element of
a std::vector in the watch window.
So I go p2->Points[0].Type

Points is a std::vector of a class which has a member variable Type.

Problem is, in the value window, it displays: CX0058: Error: Overloaded
Operator

How do i get is to dispaly the correct value?



Tue, 11 Jan 2005 10:31:00 GMT  
 Help: damn vectors won't show up in watch window
On Fri, 26 Jul 2002 14:31:00 +1200, "Hamish"

Quote:
> Hi, I'm using MSVC6.
> I'm running in debug mode, and I want to look at the value of an element of
> a std::vector in the watch window.
> So I go p2->Points[0].Type

> Points is a std::vector of a class which has a member variable Type.

> Problem is, in the value window, it displays: CX0058: Error: Overloaded
> Operator

> How do i get is to dispaly the correct value?

This is a question for microsoft.public.vc.ide_general.

It is certainly NOT a question for comp.lang.c++.  The C++ language
does not define the workings of any compiler or IDE.

--
Jack Klein
Home: http://JK-Technology.Com
FAQs for
comp.lang.c http://www.eskimo.com/~scs/C-faq/top.html
comp.lang.c++ http://www.parashift.com/c++-faq-lite/
alt.comp.lang.learn.c-c++ ftp://snurse-l.org/pub/acllc-c++/faq



Tue, 11 Jan 2005 11:22:10 GMT  
 Help: damn vectors won't show up in watch window
Quote:

> Hi, I'm using MSVC6.
> I'm running in debug mode, and I want to look at the value of an element of
> a std::vector in the watch window.
> So I go p2->Points[0].Type

> Points is a std::vector of a class which has a member variable Type.

> Problem is, in the value window, it displays: CX0058: Error: Overloaded
> Operator

> How do i get is to dispaly the correct value?

Create a temporaty pointer or variable and point to or assign to it your data. Then you can
display this pointer in the window.


Tue, 11 Jan 2005 06:28:50 GMT  
 Help: damn vectors won't show up in watch window

Quote:

> Hi, I'm using MSVC6.
> I'm running in debug mode, and I want to look at the value of an element of
> a std::vector in the watch window.
> So I go p2->Points[0].Type

> Points is a std::vector of a class which has a member variable Type.

> Problem is, in the value window, it displays: CX0058: Error: Overloaded
> Operator

> How do i get is to dispaly the correct value?

Watch an offset from the internal pointer to the vector data (or, in
this case, since you want element 0, the internal pointer itself).  I
don't remember offhand what the name of it is.


Tue, 11 Jan 2005 21:25:47 GMT  
 Help: damn vectors won't show up in watch window


Fri, 19 Jun 1992 00:00:00 GMT  
 Help: damn vectors won't show up in watch window

Quote:

> Hi, I'm using MSVC6.
> I'm running in debug mode, and I want to look at the value of an element of
> a std::vector in the watch window.
> So I go p2->Points[0].Type

> Points is a std::vector of a class which has a member variable Type.

> Problem is, in the value window, it displays: CX0058: Error: Overloaded
> Operator

> How do i get is to dispaly the correct value?

This isn't the right newsgroup for this you should post to
microsoft.public.vc.stl
in future

but to do it the variable in the watch window should be
p2->Points._First[0].Type

the '_First' is an internal member of the vector



Wed, 12 Jan 2005 00:21:35 GMT  
 
 [ 6 post ] 

 Relevant Pages 

1. Help: Damn vectors won't show up in debug window

2. Help: Damn vectors won't show up in debug window

3. Watch won't show pointer address

4. COM properties don't show in VB watch window

5. Icon made in resource editor won't show drawing in Alt-Tab window

6. VC5 Help won't show up

7. STL Vector in Watch Window?

8. STL Vector in Watch Window?

9. Variable data not showing in watch windows

10. wrong value for a variable showing in the watch window

11. Report won't always show current data

12. Dr. Watson won't show symbols

 

 
Powered by phpBB® Forum Software