rand() and RAND_MAX won't match

From: $B=)3p86(B <betterwang_at_gmail.com>
Date: Sun, 12 Nov 2006 21:23:10 -0500


Hi,

I am using root to run my little cpp code. RAND_MAX is defined as (long)2147483647. But rand() generates only 5-digit number which is much smaller than RAND_MAX.
Am i missing something here? How to use rand() and RAND_MAX to make my code run properly?

-- 
$B=)3p86(B
Received on Mon Nov 13 2006 - 03:23:19 MET

This archive was generated by hypermail 2.2.0 : Mon Jan 01 2007 - 16:32:01 MET