cplusplus
.com
TUTORIALS
REFERENCE
ARTICLES
FORUM
C++
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs
Forum
General C++ Programming
How to make an alphanumeric with restric
How to make an alphanumeric with restrictions
Dec 14, 2012 at 1:27am UTC
shadowwesley77
(1)
I want to make an alphanumeric string generator that uses capital letters and numbers to make a random string. I also want it to only use 7 numbers and 18 letters and mix them randomly together. I'm not sure on how to do this! please help.
Dec 14, 2012 at 1:35am UTC
Disch
(13742)
1) pick 18 letters, put them in an array.
2) pick 7 numbers, put them in the same array.
3) Use std::random_shuffle to randomize the array.
Reference with example:
http://www.cplusplus.com/reference/algorithm/random_shuffle/
Topic archived. No new replies allowed.