CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 8 of 8

Threaded View

  1. #1
    Join Date
    Apr 2003
    Location
    Sydney, Australia
    Posts
    151

    Question RE. STL's <set>

    Code:
    set<DWORD> someSet;
    pair< set<DWORD>::Iterator, bool > prInsertNumN;
    
    someSet.Insert(SomeValue1);
    someSet.Insert(SomeValue2);
    ...
    prNInsert = someSet.Insert(SomeValueN);
    someSet.Insert(SomeValueN+1);
    someSet.Insert(SomeValueN+2);
    ...
    
    //prNInsert.first has become invalid...
    Basically- I'd like the someSet iterator prNInsert to stay pointing to the SomeValueN element, even though things are being inserted/removed in the set to which it belongs before and after it.

    Is this even possible- and ny ideas how I may do this?

    Thanks heaps
    Last edited by Metro_Mystery; February 16th, 2007 at 10:35 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured