and I want to remove bug, but I didn't know its exact position in the vector (I don't know the order of this list before running the program), how would I do that?
You should use find to locate the string and delete that.
1 2 3 4 5 6 7 8
typedef std::vector<std::string> stringlist_t;
//...
stringlist_t::iterator p = std::find(list.begin(), list.end(), "bug");
if (p != list.end())
{
// we found the position of bug
list.erase(p);
}