deleting selected elements in a vector
I want to go through a vector and delete any strings that contain nothing.
ex: a vector containing:
I want to get rid of the >< elemnt and have only :
I tried this:
for (i=0; i<4; i++)
if(vars.vectParmSelected[i].ParamName == '\0')
i get an error
vector <structLink> vectParmSelected;
But I do want to delete the whole structure at position i. How would this be fixed?
error C2664: 'struct structLink *__thiscall std::vector<struct structLink,
class std::allocator<struct structLink> >::erase(struct structLink *)' : cannot
convert parameter 1 from 'int' to 'struct structLink *'