Archived

This topic is now archived and is closed to further replies.

questions about srand, rand among others.

This topic is 5586 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I was browsing all the tutorials at www.gametutorials.com and i saw this one about a little face navigating through a random maze. The tutorial listed all the the methods that were used to make the "game" and they were. 1. rand() 2. srand() 3. GetStdHandle() 4. WriteConsoleOutput() 5. ReadConsoleOutput() 6. FlushConsoleInputBuffer() I thought it was great that it listed them so i immediately open my Sam''s C++ in 21 days book to find those names in the index and none of those things were in there. I thought at least rand and srand would be in there. Why doesnt Sam''s C++ in 21 Days cover this? I mean is that something that you wouldnt deal with unless you were making a game? Also where can i go to learn about these things more in depth? gametutorials.com is good but i need more. Thanks. "Poor is the pupil that does not surpass the master"

Share this post


Link to post
Share on other sites
ah thanks for the site, i didnt know you could look up functions at the msdn site.

Still why doest a book as comprehensive as C++ in 21 days cover any of those things?

"Poor is the pupil that does not surpass the master"

Share this post


Link to post
Share on other sites
The C++ Standard states that srand() and rand() must be learnt on the 22nd day. Maybe there will be a sequel to your book.

Seriously though, I guess the writers had to cut some things out.

Share this post


Link to post
Share on other sites