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();
}
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();
}