+ 1

How do I continously randomize values within code???

I camt quite explain this but, I used to do this by using classes and recall each class to randomize the values, But it isn't working.. https://code.sololearn.com/c1ABwQY4x2G6/?ref=app

4th Feb 2023, 4:24 AM
Shapa
Shapa - avatar
10 Answers
+ 3
You can do it similar to this example: https://code.sololearn.com/cjqnVOICZkkg/?ref=app
4th Feb 2023, 9:52 AM
JaScript
JaScript - avatar
+ 2
This is what I think you want https://code.sololearn.com/c877hX5WXvWj
4th Feb 2023, 8:53 AM
SoloProg
SoloProg - avatar
+ 2
Thank you Soloprog
4th Feb 2023, 2:56 PM
Shapa
Shapa - avatar
0
The rand function has several problems and modern c++ codes should be using it. There's a random-number library, defined in the random header, implemented two classes 1. Random number engine 2. Random number distribution that generates a sequence of unsigned random numbers, in a given range, distributed according to a particular probability distribution. https://code.sololearn.com/cB34wn9peSJh/?ref=app
4th Feb 2023, 5:36 AM
Mirielle
Mirielle - avatar
0
Can you please do it with a class Recall class to change value overtime??? I was able to do it with a dodging puncher game, but I forgot.
4th Feb 2023, 6:03 AM
Shapa
Shapa - avatar
0
Shapa I have updated the code to use class, make sure you are passing a reference to the random engine
4th Feb 2023, 6:40 AM
Mirielle
Mirielle - avatar
0
Can you do a string array please??? look at my code and run it
4th Feb 2023, 6:42 AM
Shapa
Shapa - avatar
0
Shapa I have modified the code to exactly what you provided
4th Feb 2023, 6:52 AM
Mirielle
Mirielle - avatar
0
Indeed Soloprog.....now Try do it without the constructor🤟🔥🔥🔥
4th Feb 2023, 2:10 PM
Shapa
Shapa - avatar
4th Feb 2023, 3:04 PM
SoloProg
SoloProg - avatar