+ 1

How to find random variable from array in c++

For example, i have variables a, b and c. I do array arr[3] = {a, b, c]}. So, how i can find random variable?

24th Apr 2018, 10:03 AM
Egor
10 Answers
24th Apr 2018, 10:48 AM
Nomeh Uchenna Gabriel
Nomeh Uchenna Gabriel - avatar
+ 3
On google?
24th Apr 2018, 11:12 AM
Timon Paßlick
+ 3
google.com/search?q=c%2B%2B+random
24th Apr 2018, 11:13 AM
Timon Paßlick
+ 2
Just look at the <random> header.
24th Apr 2018, 10:20 AM
Timon Paßlick
+ 2
Nomeh Uchenna Gabriel That's the C way of generating random numbers. The C++11 way would be the <random> header.
24th Apr 2018, 11:10 AM
Timon Paßlick
0
Thanks!
24th Apr 2018, 10:50 AM
Egor
0
Ok, where can i find something about this?
24th Apr 2018, 11:11 AM
Egor
0
About <random> header
24th Apr 2018, 11:12 AM
Egor
0
Ok
24th Apr 2018, 11:12 AM
Egor
0
Ok, thx
24th Apr 2018, 11:15 AM
Egor