Assigning vector element to vector iterator

This may be a simple answer, but after self teaching myself on vectors for a few hours of I haven't been able to find the answer. I'm using class objects in a vector, and trying to complete the delete functionality according to a class variable.

This compiles, but when I run the program it crashes on the line specified, from the debugger it looks like itr doesn't initialize at all. The logic works, as I use the same loops to select specific vector items for display. But to erase an item in the vector I need an iterator, and that's what I'm having trouble getting. At first I thought it could be something with my class, but testing it out with a vector<int> I get the same problem. So how do I accomplish this? Am I missing something simple?