<s>[INST] Here is a C++ code snippet that generates a random number between 0 and 1:
```
double randomDoubleBetween0And1() {
    return ((double) rand()) / RAND_MAX;
}
```
This function is working fine although it's not perfectly uniform due to the division. However, there is a bug in the code - the `rand()` function is not seeded, so it will generate the same sequence of numbers on every run. How would you modify this function to fix this issue?[/INST]