Re: this is the end()

From: NKOBAYE027 (NKOBAYE027_at_Rogers.Com)
Date: 05/11/04


Date: Tue, 11 May 2004 15:05:56 GMT

Yes, Buster, I agree to an extent. Actually, I said, in my first post which
has gotten lost in the morass - better morass than nothing at all though -
that I am certain it has something to do with the way pointers are being
compared. I'm not comparing the pointed to counted pointers, by the way, but
the actual objects pointed to by the pointed to counted pointers. :o)

Anyway, never mind - I've resigned myself to redefining the classes (using
the auto_ptr or whatever other thingie you described) and defining my own
iterator class from scratch instead of inheriting from the typename
MathematicalSet::Set::(const_)iterator as I had previously. That way I
should be able to ensure that end() and begin() behave as I want them to.

And as to the nasty smell - nahhhh you were the first and the post was up
for a day b4 I got anything. Afterward...I suspect the locals were simply
enjoying the repartee and expecting fisticuffs.

best regards,
L.

"Buster" <noone@nowhere.com> wrote in message
news:c7qe30$svv$1@news5.svr.pol.co.uk...
>
> I think I must leave a nasty smell on any posts I respond to that
> discourages other humans from approaching.
>
> Anyway. The problem you want to solve is to do with the == and !=
> operators defined for your iterator class. They should be comparing
> positions in the set, not comparing the pointed-to counted pointers.
>
> Good luck.
>
> --
> Regards,
> Buster.



Relevant Pages

  • Re: map.find doesnt find
    ... Basically the map.findmethod fails to find a match for a key that I ... The method is comparing pointers to determine if the objects are ... In my case the map key is of type const wchar_t* so this is ... Key type is a pointer so mapcompares those pointers, ...
    (microsoft.public.vc.stl)
  • Re: 74HC123 and long pulse
    ... Multiple memory banks, weak instruction ... existing C code because pointers don't work well with multiple memory ... You're comparing a PIC to a real CPU. ... Do you actually need to use C (with pointers, ...
    (sci.electronics.design)
  • Re: C vs. C++
    ... example, unlike C, C++ has a portable mechanism for comparing ... unrelated pointers. ... where to get memory. ...
    (comp.lang.c)
  • Re: dynamic_cast
    ... pointers rather than retrieving and comparing type_info objects. ... Pointers can normally be compared in a single operation, ... inheritance tree -- the typical expectation is that inheritance trees ... list of vtable pointers, you'd create a hash-table indexed by the value ...
    (comp.lang.cpp)
  • Re: CListCtrl sort not working
    ... The comparing function SortFunc in the aforementioned article uses the ... obsolete strcmp function to compare strings. ... I don't like this way of comparing strings. ... TCHAR* pointers for string. ...
    (microsoft.public.vc.mfc)