Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

vector erase

Status
Not open for further replies.

ARCITS

Programmer
Joined
Apr 4, 2002
Messages
99
Location
GB
I have a vector pointing to a class ..

vector <borrower* > BorrowerVector;
borrower *temp = new borrower();

i want to iterate through the array until a number (no) matches an element in the class as follows .....
And then erase that vector element - how do i do this?
Thanks


for (int it=0;it !=BorrowerVector.size()-1;it++)
{
if (no==(BorrowerVector[it]->borrowerNo))
{
BorrowerVector[it]->borrowerName=BorrowerVector.erase();
}
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top