#include int main() { srand(time(NULL)); int num1 = (rand() % 6) + 1; int num2 = (rand() % 6) + 1; int num3 = (rand() % 6) + 1; std::cout
@rajrohit-rj5 ай бұрын
random.cpp: In function 'int main()': random.cpp:5:20: error: 'time' was not declared in this scope srand(time(NULL)); ^
@dineshreddy33613 ай бұрын
@@rajrohit-rj include
@D-o-n-k2 жыл бұрын
It’s so odd how different c++ is when it comes to random integers. I love it.
@tee-hee9553 Жыл бұрын
#include
@Ryan-cv1wd2 ай бұрын
Thank you good sir!
@rafo21pe Жыл бұрын
hello bro code, im using dev c++ the did not work .i only included iostream, do i need to include another header file?
@rafo21pe Жыл бұрын
#include #include #include #include this solved everything.
@blacobama87309 ай бұрын
@@rafo21pectime is enough
@yellowhellow-wi9gi2 ай бұрын
@@rafo21pe thank you usind the ctime solved my problem
@zdravkojovancevic46562 жыл бұрын
I needed to include header file to use time function? I don't see that you've used it.
@wael7pg1572 жыл бұрын
me too ihave the same problem
@Spider_r0r5 ай бұрын
You are currently using older compiler version maybe
@BunrithViwatthanak3 ай бұрын
brocode's code works for me and were not importing the because i think you're using the older version of GCC or G++
@Codewithpuran9 күн бұрын
i need to include and also :( even after using the latest version of compiler
@FrederikWollert8 ай бұрын
Defeat the KZbin Algorithm
@blue_24_577 ай бұрын
😂
@NapNotYap2 ай бұрын
what do i do if i want the user to input a seed value and use that seed value for the random number generator
@yellowhellow-wi9gi2 ай бұрын
Thanks a lot bro code
@katz7893 ай бұрын
Bro if i input something else except numbers output becomes infinite :(( Please help me out!!! #include int main() { int num = 0; int guess = 0; int tries = 0; std::cout