Thread: Borland to MSVC, code problems

  1. #1
    Registered User
    Join Date
    Aug 2001
    Posts
    411

    Borland to MSVC, code problems

    I recently got a copy of MSVC, and im trying to finish up some of my old projects that i started in borland.

    I used to use the function random() which i got from includeing math.h, but msvc dosent apparantly have that function?

    I thought all the headers were standard?

  2. #2
    of Zen Hall zen's Avatar
    Join Date
    Aug 2001
    Posts
    1,007
    You need to use rand() and srand() in <cstdlib>, random() is a non-standard function.
    zen

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Binary Search Trees Part III
    By Prelude in forum A Brief History of Cprogramming.com
    Replies: 16
    Last Post: 10-02-2004, 03:00 PM
  2. Problems with code from the FAQ
    By Bhaunted in forum C++ Programming
    Replies: 1
    Last Post: 08-31-2004, 02:36 PM
  3. << !! Posting Code? Read this First !! >>
    By kermi3 in forum Linux Programming
    Replies: 0
    Last Post: 10-14-2002, 01:30 PM
  4. << !! Posting Code? Read this First !! >>
    By biosx in forum C++ Programming
    Replies: 1
    Last Post: 03-20-2002, 12:51 PM
  5. structs, array, code has problems, Im lost
    By rake in forum C++ Programming
    Replies: 4
    Last Post: 03-13-2002, 02:02 AM