J
Juha Nieminen
Any suggestions how to make this compile?
//-----------------------------------------------------------------------
#include <algorithm>
#include <cstdlib>
// The actual rng replaced with std::rand() for simplicity
unsigned randValue() { return std::rand(); }
unsigned randValue(unsigned modulo) { return std::rand() % modulo; }
int main()
{
int table[10];
std::random_shuffle(table, table+10, randValue);
}
//-----------------------------------------------------------------------
(Other than removing the first randValue() function, of course.)
//-----------------------------------------------------------------------
#include <algorithm>
#include <cstdlib>
// The actual rng replaced with std::rand() for simplicity
unsigned randValue() { return std::rand(); }
unsigned randValue(unsigned modulo) { return std::rand() % modulo; }
int main()
{
int table[10];
std::random_shuffle(table, table+10, randValue);
}
//-----------------------------------------------------------------------
(Other than removing the first randValue() function, of course.)