[c++] Check if element is in the list (contains)