Re: removing the 5th STL object

Discussion in 'C++' started by Stephen Howe, Jun 28, 2003.

  1. Stephen Howe

    Stephen Howe Guest

    > std::vector<long>::iterator i=online_userid.begin();
    > i += 5;
    > online_userid.erase(i);
    >
    > It the above ok?


    It is fine providing your vector has 6 objects or more.

    Stephen Howe
     
    Stephen Howe, Jun 28, 2003
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    5
    Views:
    617
    Roedy Green
    Apr 13, 2006
  2. Replies:
    0
    Views:
    537
  3. John Harrison

    Re: removing the 5th STL object

    John Harrison, Jun 28, 2003, in forum: C++
    Replies:
    1
    Views:
    741
    Søren Grønbech
    Jun 28, 2003
  4. Kishor
    Replies:
    13
    Views:
    1,495
    Sidney Cadot
    Feb 3, 2004
  5. Richard Jones
    Replies:
    0
    Views:
    233
    Richard Jones
    Aug 4, 2007
Loading...

Share This Page