+ 6

How the randomize() function works?? I cannot understand 😞😞😞 .

26th Nov 2017, 1:52 PM
Sayan Chakraborty
Sayan Chakraborty - avatar
4 odpowiedzi
+ 5
There no function called randomize() and random() in c++. Do you mean rand()? This article explain enough for you : http://www.cplusplus.com/reference/cstdlib/rand/
26th Nov 2017, 2:22 PM
Momo Belia
Momo Belia - avatar
+ 3
this is how you can make rand function on your own.... WITHOUT ANY RAND FUNCTION IN ANY LANGUAGE... ## input max range ## it will print a random number from 1 to that range *** HOPE IT WILL GET CLEAR HOW A NUMBER OR CHOICE CAN BE GENERATED RANDOMLY*** https://code.sololearn.com/cLFvBboykb8P/?ref=app https://code.sololearn.com/cq5vk3A4FW9n/?ref=app
26th Nov 2017, 5:59 PM
sayan chandra
sayan chandra - avatar
+ 3
Don't use rand(), it's old now. Use the <random> header.
26th Nov 2017, 8:47 PM
Timon Paßlick