I\'ve got a vector that I\'m trying to fill up with random numbers. I keep running into an issue however that the vector mostly outputs 0 each time that I\'m running it (it
What about simply:
#include #include #include std::srand(unsigned(std::time(nullptr))); std::vector v(1000); std::generate(v.begin(), v.end(), std::rand);