+ 2
C++ classes
HI GUYS, I AM WRITING ALL CAPS BECAUSE APPARENTLY MY KEYBOARD HAS A PROBLEM AND I CANâT TOGGLE IT OFF. THIS COMMUNITY HAS BEEN GREAT SO FAR, AND I AM CONFIDENT SOMEONE MIGHT BE SO KIND TO HELP ME OUT AGAIN. I AM LEARNING C++, BUT I AM STRUGGLING WITH CLASSES QUITE A BIT. I MADE THIS CODE AS AN ATTEMPT TO LEARN THEM BETTER, I HOPE SOMEONE MIGHT REVIEW IT AND TELL ME HOW TO IMPROVE AND IF THE THEORY IS GOOD. THANKS. https://code.sololearn.com/cews9NCLSPjs/?ref=app
4 Answers
+ 2
~ swim ~ you can create a range of random numbers by the default
rand()
Eg:
int from=10;
Int to=100;
Int range=to-from;
Int random=from+rand()%range;
The random variable will create random numbers from 10 to 100
+ 1
~ swim ~ Wow thanks a lot, very helpful
+ 1
~ swim ~ So is there an example of code on your profile where you have wn example on this new random number generator you were talking about? If it isnât a problem I would like to learn more from you ;)
0
~ swim ~ Hey man I have another problem and I was womdering if tou could help me out with it, if this isnât the case I canât blame you, you have already done enough for me đ
https://www.sololearn.com/Discuss/2105242/?ref=app