I am to create a c++ logic game with with the difficulty of 3-10 characters (@#%?) that are produced within a string randomly. The player is to guess the random characters. Once the player has guessed, the message of how many the player guessed right is displayed. I am using the switch command to have the player determine the difficulty level, I am not sure how to create a random string with gen_random.
Asked
Active
Viewed 276 times
-1
-
3Please format this in the form of a question. – JoshD Oct 21 '10 at 18:47
-
Is your question: "How do I generate a random string?" – C.J. Oct 21 '10 at 19:05
2 Answers
0
This was answered here on stack overflow:
How do I create a random alpha-numeric string in C++?
This guys solution generates a random string of characters (i.e. char*) of a specified length.