Thread: Need Help! Random in MFC

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Registered User
    Join Date
    Sep 2010
    Posts
    9

    Need Help! Random in MFC

    Greetings!
    I'm a beginner, still in school. I'm doing a small project in MFC. It's a basic animation of a ball bouncing off the four wall in a square. I don't exactly understand what this does randomly : srand((unsigned)time (NULL)). Also how would I use this to make the ball bounce randomly on the walls? Sorry if this is simple. Right now it bounce SE to SW to NW to NE. Once it hits the corners the ball then bounces across from corner to corner stuck that way.
    Thanks!
    Last edited by laserlight; 09-18-2010 at 01:59 AM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Another brain block... Random Numbers
    By DanFraser in forum C# Programming
    Replies: 2
    Last Post: 01-23-2005, 05:51 PM
  2. Help generating random numbers in MFC
    By drb2k2 in forum C++ Programming
    Replies: 3
    Last Post: 04-08-2003, 08:52 AM
  3. WIndows programming?
    By hostensteffa in forum Windows Programming
    Replies: 7
    Last Post: 06-07-2002, 08:52 PM
  4. Release MFC Programs & Dynamic MFC DLL :: MFC
    By kuphryn in forum Windows Programming
    Replies: 2
    Last Post: 05-18-2002, 06:42 PM
  5. Best way to generate a random double?
    By The V. in forum C Programming
    Replies: 3
    Last Post: 10-16-2001, 04:11 PM