All I want to do is to check whether an element exists in the vector or not, so I can deal with each case.
if ( item_present ) do_this(); else do_that(
You can use count too. It will return the number of items present in a vector.
int t=count(vec.begin(),vec.end(),item);