Reply
Thread Tools
Posts: 279 | Thanked: 34 times | Joined on Jan 2010 @ Belgrade, Serbia
#1
What is the command to make computer think of a random number? In python it is number = random.randint (x, y). I'm trying to make that "Guess the number" game in C++. I know that programming in python is easier, but i kinda like C++ more.
 
Posts: 3,428 | Thanked: 2,856 times | Joined on Jul 2008
#2
http://www.cplusplus.com/reference/c.../cstdlib/rand/ ??
__________________
If I've helped you or you use any of my packages feel free to help me out.
-----------------------------------------------------------------------------------
Maintaining:
pyRadio - Pandora Radio on your N900, N810 or N800!
 

The Following User Says Thank You to fatalsaint For This Useful Post:
hopbeat's Avatar
Posts: 516 | Thanked: 643 times | Joined on Oct 2009 @ Denmark/Poland
#3
@white_ranger, I think that you may consider asking those questions at some programming forum. Probably people will be quicker and more helpful there with general C++ problems
__________________
Hi! I'm a Maemo Greeter!
Witaj na talk.maemo.org!

Useful links for newcomers:
Użyteczne linki:
Nowi użyktownicy mówią cześć | New members say hello , Tu zaczynają nowi użytkownicy | New users start here, Podforum społeczności | Community subforum, Wiki dla początkujących | Beginners' wiki page, Maemo5 101, Często zadawane pytania | Frequently Asked Questions (FAQ), Google

Jeżeli mogę w czymś pomóc, pytaj!
If I can help with anything else, just ask!

Bored? Follow me
 

The Following 3 Users Say Thank You to hopbeat For This Useful Post:
Posts: 279 | Thanked: 34 times | Joined on Jan 2010 @ Belgrade, Serbia
#4
Thanks. I have some problems with registering at one forum now, that's why i posted this question here.
 
Posts: 3,428 | Thanked: 2,856 times | Joined on Jul 2008
#5
Originally Posted by white_ranger View Post
Thanks. I have some problems with registering at one forum now, that's why i posted this question here.
Your first step for a question like this should *always* be google.

http://lmgtfy.com/?q=c%2B%2B+random

Very first result is a c++ reference to the "rand" function.
__________________
If I've helped you or you use any of my packages feel free to help me out.
-----------------------------------------------------------------------------------
Maintaining:
pyRadio - Pandora Radio on your N900, N810 or N800!
 

The Following User Says Thank You to fatalsaint For This Useful Post:
Posts: 279 | Thanked: 34 times | Joined on Jan 2010 @ Belgrade, Serbia
#6
Originally Posted by fatalsaint View Post
Your first step for a question like this should *always* be google.

http://lmgtfy.com/?q=c%2B%2B+random

Very first result is a c++ reference to the "rand" function.
How did you made that what appears when i click on the link?
 
Posts: 3,428 | Thanked: 2,856 times | Joined on Jul 2008
#7
Originally Posted by white_ranger View Post
How did you made that what appears when i click on the link?
http://lmgtfy.com/
__________________
If I've helped you or you use any of my packages feel free to help me out.
-----------------------------------------------------------------------------------
Maintaining:
pyRadio - Pandora Radio on your N900, N810 or N800!
 

The Following User Says Thank You to fatalsaint For This Useful Post:
Posts: 279 | Thanked: 34 times | Joined on Jan 2010 @ Belgrade, Serbia
#8
Thanks. Really like it.
 
Posts: 3,428 | Thanked: 2,856 times | Joined on Jul 2008
#9
If someone helps you it's always good manners to click the little "thanks!" button under their post .
__________________
If I've helped you or you use any of my packages feel free to help me out.
-----------------------------------------------------------------------------------
Maintaining:
pyRadio - Pandora Radio on your N900, N810 or N800!
 

The Following User Says Thank You to fatalsaint For This Useful Post:
Reply


 
Forum Jump


All times are GMT. The time now is 01:40.