How do you erase something in a vector? My book tells me to use pop_back, but from what I've been reading and trying out it removes the last object of my vector. I've tried erase, but I can't make it work!

Also, once this does work, will my if statement be ok if I add it to the code?

Any help is appreciated as always.

Code:
for(i=0; i<=Process.size()-1; i++)
	{

			if (lastName == Access[i].lastName)



//				&&
//				Access[i].firstName == firstName &&
//				Access[i].middleIni == middleIni)
			{
				
				Access.erase(i);

}