I have a std :: vector that I need to shuffle. It is only ~ 20 members. In addition, at each start of the program it is also necessary to make different shuffles.
Right now I am using random_shuffle , however it gives the same result every time the program starts. I tried using srand(unsigned(time(NULL))); which was proposed in this , however, which did not work on my platform.
If possible, I want to use only standard code.
Edit: Here is my implementation:
vector<Tile>gameTiles; gameTiles.push_back(Tile(0,0)); gameTiles.push_back(Tile(0,1)); gameTiles.push_back(Tile(0,2)); gameTiles.push_back(Tile(0,3)); gameTiles.push_back(Tile(0,4));
user1599559
source share