How can i used boost library in C++ to generate random numbers between 1 and 9999
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Did you try googling for “boost random number” first? Here’s the relevant part of their documentation generating boost random numbers in a range
You want something like this:
edit: this related question probably will answer most of your questions: why does boost::random return the same number each time?