I'll teach you the vector methods you'll use most often. Call v.empty() to check if the vector has zero elements before accessing front() or back(). Use v.clear() to delete all elements instantly, setting size to zero.
To find an element, include algorithm and use find(v.begin(), v.end(), value) which returns an iterator to the first match or v.end() if not found. Count occurrences with count(v.begin(), v.end(), value).
To check if a value exists, test if(find(v.begin(), v.end(), value) != v.end()). These algorithms work on any STL container, not just vectors.