Thread: portable random function: can someone explain it?

  1. #16
    Registered User
    Join Date
    Apr 2004
    Quote Originally Posted by laserlight View Post
    I'd say that it is not guaranteed to work. As far as I can tell, time_t is permitted to be of a floating point type, but bitwise and requires that both operands be of integer types.
    True, I believe the only constraint on time_t is that it has to be an "arithmetic type". An example for the use of a floating point based time_t would be the SAS/C environment, used on IBM mainframes.

  2. #17
    Registered User
    Join Date
    Oct 2008
    Isn't an integer underflow, as this uses, undefined behaviour as well? I'm not completely sure here...

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Getting an error with OpenGL: collect2: ld returned 1 exit status
    By Lorgon Jortle in forum C++ Programming
    Replies: 6
    Last Post: 05-08-2009, 08:18 PM
  2. Replies: 28
    Last Post: 07-16-2006, 11:35 PM
  3. Calling a Thread with a Function Pointer.
    By ScrollMaster in forum Windows Programming
    Replies: 6
    Last Post: 06-10-2006, 08:56 AM
  4. <Gulp>
    By kryptkat in forum Windows Programming
    Replies: 7
    Last Post: 01-14-2006, 01:03 PM
  5. Dikumud
    By maxorator in forum C++ Programming
    Replies: 1
    Last Post: 10-01-2005, 06:39 AM