I'm trying to perform a random shuffle of a vector using Visual Studio 2013 C++. The following is the code that I have

```
    static void shuffle(vector<int>& a){
    int N = a.size();

    unsigned long long seed = chrono::system_clock::now().time_since_epoch().count();
    default_random_engine generator(seed);

    for (int i = 0; i < N; i++){
        uniform_int_distribution<int> distribution(0,(N-1)-i);
        int r = i + distribution(generator);
        swap(a[i], a[r]);
    }
}

```

My problem is when I call this method multiple times in succession the shuffle is not random. What could be wrong with the code?

Any help would be much appreciated.