+ 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

16th Dec 2019, 9:37 PM
Francesco Derme
Francesco Derme - avatar
4 odpowiedzi
+ 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
18th Dec 2019, 11:34 AM
$p@rK
$p@rK - avatar
+ 1
~ swim ~ Wow thanks a lot, very helpful
17th Dec 2019, 6:22 AM
Francesco Derme
Francesco Derme - avatar
+ 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 ;)
17th Dec 2019, 6:28 AM
Francesco Derme
Francesco Derme - avatar
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
19th Dec 2019, 9:32 PM
Francesco Derme
Francesco Derme - avatar