Dev C++ Random Library

Posted on  by

A read(2) from /dev/random will return at most 512 bytes (340 bytes on Linux kernels before version 2.6.12). Writing to /dev/random or /dev/urandom will update the entropy pool with the data written, but this will not result. Can someone point me to one, because our high-school library is way too old. And it wont work with Dev-C(we using in it in CS class). /. Lawrenceville Press Random Library./ /. October 1997./ /. The following code works correctly under BOTH./ /. Borland and MSC.

Can someone point me to one, because our high-school library is way too old. And it wont work with Dev-C++(we using in it in CS class). Thank you. Sound of silence disturbed.

  • 2 Contributors
  • forum 2 Replies
  • 253 Views
  • 1 Day Discussion Span
  • commentLatest Postby snedanLatest Post
C++

Ancient Dragon5,243

Using Dev Random

>> srand((unsigned) time(&t));
you don't need the argument to time()

Cat Dev Random

C++

>>#if defined(_MSC_VER)
delete the above line and the corresponding #endif. time functions and rand functions are both standard c/c++ library functions that are supported by most c or c++ compilers.