Borland to MSVC, code problems

This is a discussion on Borland to MSVC, code problems within the C++ Programming forums, part of the General Programming Boards category; I recently got a copy of MSVC, and im trying to finish up some of my old projects that i ...

  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
    zen
    zen is offline
    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, 11:51 AM
  5. structs, array, code has problems, Im lost
    By rake in forum C++ Programming
    Replies: 4
    Last Post: 03-13-2002, 01:02 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21