debuging STL under visual 
Author Message
 debuging STL under visual

Hi everybody!!

I am using Visual Studio 6 and a vector<CMaClass>
Eveything is ok, but when i want to debug i cannot access the vector's
informzations, for example:

    vector <CMyClass> vVect;

    vVect.push_back(CMyClass());
    vVect.push_back(CMyClass());
    vVect.push_back(CMyClass());

    vVect[0].myClassMember = 0;

this is what is in the code and it runs,
but if I put
    vVect[0].myClassMember
in Visual's de{*filter*}, it tells me there is an error like 'ambigous type..."

Does anyone no what to do??
thanks
toms



Wed, 22 Jun 2005 20:35:17 GMT  
 debuging STL under visual
Hi Toms,

vector overloads the [] operator, so it doesn't work in the VC de{*filter*}.
You can try the following in the watch window:

vVect._First,10

- or -

vVect._First[0].myClassMember

Hope this helps.

Best Regards,
Leo Chen

This posting is provided "AS IS" with no warranties, and confers no rights.

--------------------

| Newsgroups: microsoft.public.vc.de{*filter*}
| Subject: debuging STL under visual
| Date: Sat, 4 Jan 2003 13:35:17 +0100
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2720.3000
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
| Lines: 27

| Organization: Guest of ProXad - France
| NNTP-Posting-Date: 04 Jan 2003 13:35:18 MET
| NNTP-Posting-Host: 62.147.143.137
| X-Trace: 1041683718 news2-2.free.fr 27683 62.147.143.137:1164

| Path:
cpmsftngxa06!TK2MSFTNGP08!cppssbbsa01.microsoft.com!news-out.cwix.com!newsfe
ed.cwix.com!newsfeed.icl.net!newsfeed.fjserv.net!proxad.net!feeder2-1.proxad
.net!news2-2.free.fr!not-for-mail
| Xref: cpmsftngxa06 microsoft.public.vc.de{*filter*}:14851
| X-Tomcat-NG: microsoft.public.vc.de{*filter*}
|
| Hi everybody!!
|
| I am using Visual Studio 6 and a vector<CMaClass>
| Eveything is ok, but when i want to debug i cannot access the vector's
| informzations, for example:
|
|     vector <CMyClass> vVect;
|
|     vVect.push_back(CMyClass());
|     vVect.push_back(CMyClass());
|     vVect.push_back(CMyClass());
|
|     vVect[0].myClassMember = 0;
|
|
| this is what is in the code and it runs,
| but if I put
|     vVect[0].myClassMember
| in Visual's de{*filter*}, it tells me there is an error like 'ambigous
type..."
|
| Does anyone no what to do??
| thanks
| toms
|
|
|
|
|



Sat, 25 Jun 2005 12:07:11 GMT  
 debuging STL under visual
Hi! thaks for haing answered to me! :)
well, when I try this, Visual's de{*filter*} tells me it doesn't know symbol
_First...

And I already tryed to do
vVect.at(2) to acces my 3rd element, but it is the same thing : symbol at
not found!!!!

Why does not this work?? are vectors so particulars to be unable to be
interpreted by visual's de{*filter*}??????
Or have I made any mistake? Have I forgotten any option???

toms

Quote:
> Hi Toms,

> vector overloads the [] operator, so it doesn't work in the VC de{*filter*}.
> You can try the following in the watch window:

> vVect._First,10

> - or -

> vVect._First[0].myClassMember

> Hope this helps.

> Best Regards,
> Leo Chen



Sun, 26 Jun 2005 17:02:26 GMT  
 debuging STL under visual

Quote:

>Hi! thaks for haing answered to me! :)
>well, when I try this, Visual's de{*filter*} tells me it doesn't know symbol
>_First...

Not sure why that doesn't work. Works for me. Are you sure you're using
the stl shipped with VC6.0? You have to prefix _First with the name of
your vector (i.e. MyVector._First)

Quote:
>And I already tryed to do
>vVect.at(2) to acces my 3rd element, but it is the same thing : symbol at
>not found!!!!

>Why does not this work?? are vectors so particulars to be unable to be
>interpreted by visual's de{*filter*}??????
>Or have I made any mistake? Have I forgotten any option???

See
http://www.*-*-*.com/

Basically the de{*filter*} can't distinguish between overloaded operators
that have const and non-const versions. This I think explains why the
operator[] won't work as expected.

--
sashan
-------------------------------
P: Egad! You astound me, Brain!
B: That's a simple task, Pinky.



Sun, 26 Jun 2005 19:04:36 GMT  
 debuging STL under visual
Either drill down into your vector by clicking on the plus sign, or look in
the
vector header file to find the name of the member variable that holds
a pointer to the allocated memory. The name of this member variable
changed from VC++ 6.0 to .Net, but the technique remains the same.

The ,10 after vVect._First tells VC++ to display ten elements from
the memory pointed to by vVect._First, which can be handy.

.at() might not work because you never call that function in your code
(in which case it isn't generated) or because the de{*filter*} sometimes
has difficulty calling functions, especially template functions.

The de{*filter*} doesn't help very much with STL debugging, and templates
do cause a few difficulties with debugging, but it can be made to work.

--
This posting is provided "AS IS" with no warranties, and confers no rights.


Quote:
> Hi! thaks for haing answered to me! :)
> well, when I try this, Visual's de{*filter*} tells me it doesn't know symbol
> _First...

> And I already tryed to do
> vVect.at(2) to acces my 3rd element, but it is the same thing : symbol at
> not found!!!!

> Why does not this work?? are vectors so particulars to be unable to be
> interpreted by visual's de{*filter*}??????
> Or have I made any mistake? Have I forgotten any option???

> toms

> > Hi Toms,

> > vector overloads the [] operator, so it doesn't work in the VC de{*filter*}.
> > You can try the following in the watch window:

> > vVect._First,10

> > - or -

> > vVect._First[0].myClassMember

> > Hope this helps.

> > Best Regards,
> > Leo Chen



Mon, 27 Jun 2005 01:48:01 GMT  
 debuging STL under visual
thanks! it works!
my implementation of STL requires vVect._M_start
:)

Quote:
> >Hi! thaks for haing answered to me! :)
> >well, when I try this, Visual's de{*filter*} tells me it doesn't know symbol
> >_First...

> Not sure why that doesn't work. Works for me. Are you sure you're using
> the stl shipped with VC6.0? You have to prefix _First with the name of
> your vector (i.e. MyVector._First)

> >And I already tryed to do
> >vVect.at(2) to acces my 3rd element, but it is the same thing : symbol at
> >not found!!!!

> >Why does not this work?? are vectors so particulars to be unable to be
> >interpreted by visual's de{*filter*}??????
> >Or have I made any mistake? Have I forgotten any option???

> See

http://www.*-*-*.com/
l/vchowdifferences.asp

- Show quoted text -

Quote:

> Basically the de{*filter*} can't distinguish between overloaded operators
> that have const and non-const versions. This I think explains why the
> operator[] won't work as expected.

> --
> sashan
> -------------------------------
> P: Egad! You astound me, Brain!
> B: That's a simple task, Pinky.



Mon, 27 Jun 2005 17:07:45 GMT  
 
 [ 6 post ] 

 Relevant Pages 

1. STL Debuging Add-on for VC 6.0

2. Version of STL with Visual Studio.NET?

3. STL map & Visual C++

4. Visual C++ 6.0 and STL?

5. Using both STL and MFC with Visual C++ 5.0

6. Using both STL and MFC in Visual C++ 5.0

7. Combining STL and MFC in Visual C++ 5.0

8. Using STL with Visual C++ 5

9. Can't compile STL with Visual Studio 97

10. Visual C++ 6.0 and STL?

11. Using both STL and MFC with Visual C++ 5.0

12. Using SGI-STL with Visual C 4.0

 

 
Powered by phpBB® Forum Software