The C standard document offers a minimal portable definition:
static unsigned long int next = 1;
int rand(void) // RAND_MAX assumed to be 32767
{
next = next * 1103515245 + 12345;
...
Type: Posts; User: sonjared
The C standard document offers a minimal portable definition:
static unsigned long int next = 1;
int rand(void) // RAND_MAX assumed to be 32767
{
next = next * 1103515245 + 12345;
...
The declaration is all you'll find in header files, unless the function is also defined as a macro or template in C++. Some compilers will ship with source code for the standard libraries, and that...