I wanted to generate a floating point random number and i read about the functions drand48, erand48, are these functions paired and are analogous to the functions srand & rand.
i wrote the following program
but got the following errorsCode:#include <stdlib.h> #include <time.h> #include <string.h> int main(void) { int i; int number; float random_value; float float_number; printf("What is the number"); scanf("%d",&number); drand48((unsigned int)time(NULL)); for(i=0;i<10;i++) { random_value=erand48(); float_number=random_value/(float)number; printf("\n%f",float_number); } getch(); return 0; }
Linking...
test2.obj : error LNK2001: unresolved external symbol _erand48
test2.obj : error LNK2001: unresolved external symbol _drand48
please help