Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C++ > Re: removing the 5th STL object

Thread Tools

Re: removing the 5th STL object

Stephen Howe
Posts: n/a
> 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

Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Removing GPO setting from XP machine after removing from Domain Piet Slaghekke Computer Support 4 01-02-2007 08:58 PM
removing a namespace prefix and removing all attributes not in that same prefix Chris Chiasson XML 6 11-14-2006 05:08 PM
What is the 5th number in ip address Jeff Wireless Networking 6 03-16-2006 11:38 PM
Object creation - Do we really need to create a parent for a derieved object - can't the base object just point to an already created base object jon wayne C++ 9 09-22-2005 02:06 AM
Re: removing the 5th STL object John Harrison C++ 1 06-28-2003 06:30 PM