Re: err ITERATOR LIST CORRUPTED!



The sample code doen't show the problem, but the real code is too complex to
post.
If I make the variable "cursor" a iterator instead of const_iterator, it
works.

iterator cursor = the_list.begin(); // works

const_iterator cursor2 = the_list.begin(); // raises error

I have no idea why.


In the debug build I get this assertion ITERATOR LIST CORRUPTED (release
works).
I think it`s because I call list.begin() on an empty iterator list.
Sample Code:

class x
{
x() : the_list(), cursor(the_list.begin())
{
}
std::list<void *> the_list;
mutable std::list<void *>::const_iterator cursor;
}

----
THANKS



.



Relevant Pages

  • Re: Foreach and Iterators
    ... for sample code to roll your own Iterators. ... Normally your main collection class just implements Iterable ... Its Iterator method returns an Iterator object ...
    (comp.lang.java.help)
  • Re: show/hide mouse via command line
    ... This page gives you some sample code to control mouse cursor showing or ... You may include some control code into your application. ... command line or script) to hide and show the mouse cursor? ...
    (microsoft.public.windowsxp.embedded)
  • RE: How to use a datareader against an oracle stored procedure
    ... Basically all you have to do is create a parameter for the cursor and add it ... Then when you call ExecuteReader you will be able to ... you please repost with some sample code so I may help you better. ... OracleCommand cmd = new OracleCommand; ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: show/hide mouse via command line
    ... This page gives you some sample code to control mouse cursor showing or ... hiding. ... You may include some control code into your application. ... command line or script) to hide and show the mouse cursor? ...
    (microsoft.public.windowsxp.embedded)
  • Re: Limiting a Text Fields Input Size !
    ... if the text box is empty, then whenever the text box gets focus, the ... cursor should go to the 1st character ... ... please post some sample code which would permit me to do this? ...
    (comp.databases.ms-access)

Loading