I have a `vector<int>` which I need to search for a given value `val` and then return the index `i` of the first occurrence of that value. If the vector is empty, it should return the constant `EMPTY_VEC` This is what I have so far.

```
const int EMPTY_VEC = std::numeric_limits<int>::max();
size_t find(const std::vector<int>& v, int val)
{
    for(int i = 0; i < v.size(); ++i) {
        if(v[i] == val) { 
            return i;
            break;

        } else if(v.size() == 0) {
            return EMPTY_VEC;
        }
    }}

```

When I call this function, it returns 0 everytime.

Could it have something to do with the way my vector is defined? 

```
uint32_t seed = std::chrono::system_clock::now().time_since_epoch().count();
    // uint32_t is a type that is guaranteed to be 32 bits wide (unlike int or unsigned int)
    // seed is the pseudorandom value returned from the system clock object (like time(0))

    std::minstd_rand gen(seed);
    // gen is the object responsible for creating the random numbers

    std::uniform_int_distribution<int> dist(0,BIGGEST_RANDOM);
    // choose random ints between 0 and BIGGEST_INT

    // OK, stop ignoring now
    std::vector<int> data {};
    for (size_t i = 0; i < DATA_SIZE; ++i)
    {
        data.push_back(dist(gen)); // dist(gen) is the random int
    }`

 std::cout << find(data, 8) << std::endl;

```